Jump to content

[SOLVED] Query To Do Simple Update


dizzy1

Recommended Posts

Do

$mysql = mysql_query("
      
      UPDATE `Persons` 
      SET        
         `Name`='Dave',
         `Car`='Ford'
         `ID`='$NewID'
                   
      WHERE
         `ID`='$OLDID'
      LIMIT 1
      ") or die(mysql_error());   

 

If it errors, it will show the message, that will hopefully tell us what's wrong.

Do

$mysql = mysql_query("
      
      UPDATE `Persons` 
      SET        
         `Name`='Dave',
         `Car`='Ford'
         `ID`='$NewID'
                   
      WHERE
         `ID`='$OLDID'
      LIMIT 1
      ") or die(mysql_error());   

 

If it errors, it will show the message, that will hopefully tell us what's wrong.

 

 

CHEERS, I was missing a Commar .

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.