dolcezza Posted December 12, 2007 Share Posted December 12, 2007 The error I am getting is "Error: Unknown column 'Susan' in 'where clause'" The first name entered into the database is Susan. The values are all showing up in the database. Any ideas? Any help greatly appreciated. $query = mysql_query("INSERT INTO caregivers (firstname, lastname, email, phone, county, experience, date) VALUES ('$firstname', '$lastname', '$email', '$phone', '$county', '$experience', '$date')") or die(mysql_error()); $getrow = mysql_query("SELECT caregivers_id from caregivers where firstname=$firstname and lastname=$lastname")or die ('Error: '.mysql_error ()); if($query) { $row=mysql_fetch_array($getrow,MYSQL_ASSOC); $id=$row['id']; ?> Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted December 12, 2007 Share Posted December 12, 2007 this SELECT caregivers_id from caregivers where firstname=$firstname and lastname=$lastname should be SELECT caregivers_id from caregivers where firstname='$firstname' and lastname='$lastname' notice the single quotes you missed them out Quote Link to comment Share on other sites More sharing options...
dolcezza Posted December 12, 2007 Author Share Posted December 12, 2007 UUUGh! I think it's bedtime! Thanks 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.