Re: What's wrong with this QUERY??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



$thing = "July22@xxxxxxxxx";

$query = "SELECT id, email, familyname FROM members WHERE email=$thing";

You need to quote non-numeric values in SQL. It should be
$query = "SELECT id, email, familyname FROM members WHERE email=''$thing'";


Also, you don't really need to select the email value since you should already have it.

Larry

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux