bobocheez Posted February 14, 2009 Share Posted February 14, 2009 Ok, so I have this code and I'm getting a wierd error Table 'tutorial.tutorial' doesn't exist The error if from the //TEST below I'm using xampp if thats of any use //OPENS CONNECTION TO MYSQL SERVER $dbc = mysql_connect('localhost','root',''); if (!$dbc){ die('Not connected:' . mysql_error()); } //SELECT DATABASE $db_selected = mysql_select_db('tutorial', $dbc); if (!$db_selected){ die ('cant connect:' . mysql_error()); } //TEST $query="UPDATE tutorial SET email='hope_this_works' WHERE username='bobo'"; $result=mysql_query($query); if (!$result){ die ('update failed ->' . mysql_error()); } Link to comment https://forums.phpfreaks.com/topic/145154-solved-learning-php-need-help/ Share on other sites More sharing options...
corbin Posted February 14, 2009 Share Posted February 14, 2009 Errrr.... Does the table tutorial exist? Link to comment https://forums.phpfreaks.com/topic/145154-solved-learning-php-need-help/#findComment-761862 Share on other sites More sharing options...
bobocheez Posted February 14, 2009 Author Share Posted February 14, 2009 yes But I don't see why its saying that there is no tutorial.tutorial Shouldnt it at least say tutorial Link to comment https://forums.phpfreaks.com/topic/145154-solved-learning-php-need-help/#findComment-761867 Share on other sites More sharing options...
bobocheez Posted February 14, 2009 Author Share Posted February 14, 2009 nevermind ignore this noob it was the //TEST command didnt realize that after update it should have been the table name instead of the database name Link to comment https://forums.phpfreaks.com/topic/145154-solved-learning-php-need-help/#findComment-761869 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.