Want to get rid of Google Ads, click here.
+ Reply to Thread
Results 1 to 7 of 7

Thread: Access to the variable $query

  1. #1
    Senior Member eisefr's Avatar
    Join Date
    Nov 2001
    Location
    Germany
    Posts
    538

    Default

    Hello together..



    does someone haves a little hint how i can change the $query-variable ?

    I would like to define a query like this:

    $datum=substr(val(tod(), 2), 1, 10)



    I did try to set the $query-variable in the formatcontrol.. but it seems not to work. the $query is everytime=true. :-/



    Maybe there is a easier way to define a query?

    I dont know so much about that yet... :-/



    Thanks for your help

    Frank


  2. #2
    Administrator tommy's Avatar
    Join Date
    Nov 2001
    Location
    Copenhagen
    Posts
    4,272

    Default

    Assuming that the date is formatted like this:



    07/12/01 try



    $datum=substr(str(tod()),1,2)

  3. #3
    Senior Member eisefr's Avatar
    Join Date
    Nov 2001
    Location
    Germany
    Posts
    538

    Default

    The date format is like this:

    07/12/2001 13:52:13



    the expression datum=substr(str(tod()),1,10)

    gives me that what i want to have:

    07/12/2001



    but how can i build a query on a table like

    $query="datum=$datum"

    ?

  4. #4
    Administrator tommy's Avatar
    Join Date
    Nov 2001
    Location
    Copenhagen
    Posts
    4,272

    Default

    Btw a tip for You to test if an expression evaluates to the result You expekt is to use the debugger.




  5. #5
    Administrator tommy's Avatar
    Join Date
    Nov 2001
    Location
    Copenhagen
    Posts
    4,272

    Default

    eisefr wrote:

    but how can i build a query on a table like

    $query="datum=$datum"

    ?
    Ok then. What You need to do is to escape the "



    Try something like this



    $query=""datum=$datum""

  6. #6
    Senior Member eisefr's Avatar
    Join Date
    Nov 2001
    Location
    Germany
    Posts
    538

    Default

    I got it..

    its working now..



    THANK YOU :smile:

  7. #7
    Senior Member
    Join Date
    May 2002
    Location
    Dragør
    Posts
    290

    Default

    If you want to create a query like this:



    $L.query="time="12:00:00""



    you can type it like this:



    $L.query="time=\"12:00:00\""






+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts