Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2002
    Posts
    2

    Unanswered: very simple querie help appreciated

    Hi

    i'm a complete newbie with regards mysql/php and i'm woprking on my first project. I am trying to querie the database with the user having a choice of functions. my first function works ok but the next one:

    elseif ($submit == "Search by Priority")
    {
    $result = mysql_query("select * from mytable_name WHERE $prigall$lessequalmore$moreorless limit $numbresults");
    }

    where $prigall is a field in mytable_name
    $lessequalmore is a drop down box with values of >, ==, <
    and $moreorless is a dropdown box with numeric values.
    and $numbresults is just a limit on the number of results to display.

    As i say my first function works fine but this one goes to the results page with no error but doesn't show any results. I'm obviously doing something (very) stupid but i've played around with variations of that and it won't work, i think i'm on the right track but if anyone's got any idea it'll be very appreciated.

    thanks in advance

    Roland

  2. #2
    Join Date
    Sep 2002
    Posts
    2
    it's ok i have finaly worked it out thanks anyway:

    elseif ($submit == "Search by Priority")
    {
    $result = mysql_query("select * from tgpbuddy WHERE prigall $lessequalmore '$moreorless' limit $numbresults2");
    }

    whilst i'm here anyway (no doubt i'll be back) can anyone suggest the best php/mysql debugger type program where i can write code and it will tell me if my syntax is incorrect?

    thanks

    roland

Posting Permissions

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