Re: mysql_query

From: Date: Tue, 09 Jan 2001 17:47:53 +0000
Subject: Re: mysql_query
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-33504@lists.php.net to get a copy of this message
that`s out of my knowledge. I did not understand. augusto cesar castoldi On Tue, 9 Jan 2001, Nathan Cook wrote: > Double check the select buy having php print the variable. > For example: > > $SELECT_TXT = "SELECT * FROM"; > print("$SELECT_TXT"); > $SELECT_QRY = MYSQL_QUERY($SELECT_TXT); > > Try that and then manually run the $SELECT_TXT on your mysql server and see > if the results are different and let us know. > > -nc > ---------------------------------------------------------------------- > .:: Nathan Cook - Network/Security Admin > office: 208.343.3110 - Web Programmer > email: ncook@pcsedu.com - Qmail Admin > pager: 208.387.9983 - MIS Admin > ----------------------------------------------------------------------- > ----- Original Message ----- > From: "Augusto Cesar Castoldi" <castoldi@inf.ufsc.br> > To: <php-general@lists.php.net> > Sent: Tuesday, January 09, 2001 10:33 AM > Subject: [PHP] mysql_query > > > > 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 > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#33504) next »