Jump to content


Photo

MySQL Error Help


  • Please log in to reply
3 replies to this topic

#1 Guteman

Guteman
  • Members
  • PipPipPip
  • Advanced Member
  • 39 posts
  • LocationWisconsin

Posted 07 August 2006 - 04:26 PM

Hey All,

Can someone help me figure out what I did wrong in this mysql query?

$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");

Thanks alot!

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 07 August 2006 - 04:29 PM

Use mysql_error() function within your or die clause:
$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());
This will now return an error from mysql itself which will help you why your query is failing.

#3 Guteman

Guteman
  • Members
  • PipPipPip
  • Advanced Member
  • 39 posts
  • LocationWisconsin

Posted 07 August 2006 - 04:39 PM

cool deal, thanks for your help

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 07 August 2006 - 04:43 PM

You sorted the error then with the aid of mysql_error()?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users