Guteman Posted August 7, 2006 Share Posted August 7, 2006 Hey All,Can someone help me figure out what I did wrong in this mysql query?[code]$query = mysql_query("UPDATE projects SET name = '$name', domain = '$domain', designers = '$designer', developer = '$developer', deadline = '$deadline', webhosting = '$webhosting', projecturl = '$projecturl', phase = '$phase', status = '$status' WHERE name = '$name'") or die ("MySQL Error");[/code]Thanks alot! Link to comment https://forums.phpfreaks.com/topic/16810-mysql-error-help/ Share on other sites More sharing options...
wildteen88 Posted August 7, 2006 Share Posted August 7, 2006 Use mysql_error() function within your or die clause:[code]$query = mysql_query("UPDATE projects SET name = '$name', domain = '$domain', designers = '$designer', developer = '$developer', deadline = '$deadline', webhosting = '$webhosting', projecturl = '$projecturl', phase = '$phase', status = '$status' WHERE name = '$name'") or die ("Unable to run query: " . mysql_errro());[/code]This will now return an error from mysql itself which will help you why your query is failing. Link to comment https://forums.phpfreaks.com/topic/16810-mysql-error-help/#findComment-70752 Share on other sites More sharing options...
Guteman Posted August 7, 2006 Author Share Posted August 7, 2006 cool deal, thanks for your help Link to comment https://forums.phpfreaks.com/topic/16810-mysql-error-help/#findComment-70757 Share on other sites More sharing options...
wildteen88 Posted August 7, 2006 Share Posted August 7, 2006 You sorted the error then with the aid of mysql_error()? Link to comment https://forums.phpfreaks.com/topic/16810-mysql-error-help/#findComment-70759 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.