Jump to content

SQL syntax error , dont know why


phppaper

Recommended Posts

Thanks, but it seems doesn't work

 

I get "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where name=......

 

any idea?

 

Is it right to write it like this in a query with insert and where condition??

UPDATE will normally update ALL records that match the WHERE condition.  SO, if you have more than one record where the target field is 'empty' then all such records would update. If that's not what you want to do, you will need something unique in the WHERE clause to update a single record reliably. If your table happens to contain an auto-incremented record id for example ...

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.