jasonc Posted June 1, 2006 Share Posted June 1, 2006 The following is part of my script that does not work, the first line is what i think is causing the problem. going by the error returned.i have had this before and looked at my other script to work it out again, but can not see anything wrong?i wish to check one table for an email address and get the name in another table using the email address found in the first table.can someone enlighten me?thanks for your help.$res = mysql_query("SELECT * FROM list WHERE email='$findstring' LIMIT 1") or die(mysql_error());$name = mysql_result($res, 0, "name") or die(mysql_error()); Quote Link to comment Share on other sites More sharing options...
fenway Posted June 1, 2006 Share Posted June 1, 2006 That simply means that no results were returned -- you should probably wrap your second line in a "mysql_num_rows() > 0" condition. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.