Harmeet,
The field email is obviously a field that can accept strings. In SQL, you must wrap
strings in single-quotes. So, rewrite your query as:
$query = SELECT id, email, familyname FROM members WHERE email='$thing';
The reason it worked for id=$thing is that the id field is probably an
Thank you everybody.
Harry G [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi,
I have a database with members details and PK is id.
$thing = [EMAIL PROTECTED];
$query = SELECT id, email, familyname FROM members WHERE email=$thing;
$result = mysql_query($query);
If i do a