IanNav
Programmer
- Feb 26, 2001
- 79
Hi,
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")
.....
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.
many thanks
Ian
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")
.....
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.
many thanks
Ian