Re: Mystery variable query?

From: Date: Thu, 03 May 2001 16:47:38 +0000
Subject: Re: Mystery variable query?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-9101@lists.php.net to get a copy of this message
Hi, is there a function called mysql? You'll have to use mysql_query. The syntax isn't correct either. mysql_query("SELECT * FROM table" [, link identifier]); Look in the manual for more detailed information. hope it helps Johannes ""martin helie"" <martinh@ureach.com> schrieb im Newsbeitrag news:9crr9l$4c4$1@toye.p.sourceforge.net... > Hello everyone, I hope this hasn't been discussed before (I've looked but > haven't found any answers). > This seems very, very strange, and maybe it's just me but here goes: > > PHP 4.0.4 > mySQL 3.23.30(gamma) > > assuming: > > $var="1234"; (type does not seem to matter) > > this query returns no error, but no result either: > > mysql("database","SELECT * FROM table WHERE id='$var'"); > > but this works: > > mysql("database","SELECT * FROM table WHERE id='1234'"); > > Uh? I've tried setting the type of the variable to string, to no avail. > I've also tried things like "WHERE id LIKE '%$var%'"... > > Help?! > > Martin > > > > -- > 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 (#9101) next »