Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

select error message?

Status
Not open for further replies.

safra

Technical User
Jan 24, 2001
319
NL
hi,

I am trying to find a match in column 'email' (which is set to a tinytext column with null set to 'no') for $email in table 'clientData'.

this is the code I am using in php:

Code:
$result = mysql_query("SELECT * FROM clientData WHERE email=$email",$db);

$myrow = mysql_fetch_array($result);

I get the error message:
Warning: Supplied argument is not a valid MySQL result resource

what does this mean?

if the same code is used but on column 'id' it works fine!

Hope anyone can explain to me what I am doing wrong,

thanks,
Ron
 
b/c email is text, thus you must put $email in single quotes. ie.
WHERE email='$email' ...

cheers devnull22
(Knowledge Base Center )

--
Apparently if you play the Windows NT CD backwards you hear satanic messages. If you think that's bad, play it forwards and it installs Windows NT !
 
Thanks devnull22!

that worked

Ron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top