Hi Guys,
Using PHP5 and MYSQL
I am having a small problem with updating multiples columns in the same query.
There is a problem coming when I try to run the query. It will not update the table cause because of multiple columns but if I try to update only one column it works fine. Please help me in updating multiples below in the same query. Is there any code structure like brackets or curly braces which I should while updating. Please help. It would be very much appreciated.
Code:-1
$subject = $_POST['subject'];
$comment = $_POST['comment'];
$q = "UPDATE messages SET subject = ' ".$subject." ', body = ' ".$comment." ' WHERE messages.message_ID = $msg_ID LIMIT 1;";
Regards
Guy from London