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! Quote 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. Quote 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 Quote 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()? Quote Link to comment https://forums.phpfreaks.com/topic/16810-mysql-error-help/#findComment-70759 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.