Re: WHERE/AND problem in query to MySQL

From: Date: Tue, 12 Sep 2000 11:10:21 +0000
Subject: Re: WHERE/AND problem in query to MySQL
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-2824@lists.php.net to get a copy of this message
Are you sure that variables $kom and $gt are numbers and not strings? Bye zeles $result = mysql_query("SELECT * FROM adresse WHERE (kommune=$kom AND gate=$gt AND gatenr=$gnr AND leil=$le)",$db); (Then afterwards I wanted to use the recovered ID for search in another table) But the output was: from forms: You have searched for Kannikgata 21 , appartment no. A9 which is sited in Stavanger. Warning: 0 is not a MySQL result index in /home/httpd/html/script/side2g.php3 on line 42 from db: gatenr: id: I dont understand why the latter query failed? -- Knut Lekvam __________________________________________________________________ Denne eposten er sendt ved hjelp av http://www.Organizer.net - Norges ledende webbaserte kommunikasjonsløsning. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#2824) next »