Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

whats wrong with my statment????

Status
Not open for further replies.

IanNav

Programmer
Feb 26, 2001
79

i have a field called date, and a field called delfg.

I'm using this in a php webpage, and it returns no results when i execute it.

When i execute it without the [AND delfg <> '1'] part it works fine.

there is 1 record in table that has the value "1" in the field delfg.

mysql_query("SELECT * FROM practicelist WHERE date >= now() AND delfg <> '1' ORDER BY date ASC")

Please can tell me where im going wrong.

many thanks

Ian
 
i've tried it as

$result = mysql_query("SELECT * FROM practicelist WHERE date >= now() AND delfg = '1' ORDER BY date ASC");

and it returns 1 record (which is the correct result)

i've tried

$result = mysql_query("SELECT * FROM practicelist WHERE date >= now() AND delfg != '1' ORDER BY date ASC");

&

$result = mysql_query("SELECT * FROM practicelist WHERE date >= now() AND delfg <> '1' ORDER BY date ASC");

and i get no results....

it must be something real simple i'm getting wrong.

 
your queries look okay, i'm betting you don;t have any data in the table that matches your criteria

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top