Jump to content

Can't figure out what's wrong with mysql syntax.


leke

Recommended Posts

Hi, Anyone know what's wrong with this? There is meant to be a SQL syntax error, but it looks ok to me ::)

 

$postedThreadId = 18;

$postOrderPlusOne = "UPDATE threadId SET MAX(postOrder) + 1 FROM post_table WHERE postOrder = $postedThreadId";

 

Error:

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 'MAX(postOrder) + 1 FROM post_table WHERE postOrder = 18' at line 1

 

Thanks :-*

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.