mysql_query
| From: | Augusto Cesar Castoldi | Date: | Tue, 09 Jan 2001 17:33:24 +0000 |
| Subject: | mysql_query | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-33496@lists.php.net to get a copy of this message | ||
a few days ago I asked you this:
____________________
when I do a mysql_query on php, like
$result=mysql_query("select * from counter where date='2001-01-06'");
In case of there is no date='2001-01-06', what should be the contents of
$result?
How can I know that was no data of '2001-01-06' in database?
_____________________
you answer me like that:
$hoje=date("'Y-m-d'");
if (mysql_query("select unique,total from counter where data=$hoje")){
echo "true";
}else{
echo "false";
}
At the begining it was working. But now returns always true! I can put
anything, like "... where data='1999-05-05'", that it returns true, but
there is no date='1999-05-05' at database.
I was thinking that maybe the PHP4 server is not good...
well, someone know what the solution.
thanks,
Augusto Cesar Castoldi