Jump to content

[SOLVED] PHP MYSQL UPDATE Query Error


Giri J

Recommended Posts

Hello All,

 

I have a problem with my update query. The insert query works fine with all the values. But when I use the update query it throws me error. I'm stuck. please help.

 

Here is my update query in php

 

$q1="update vehicle SET vdesc='$vDesc',SET vimg='$vImg1',SET user='$uid',SET log=now() where vname='$vName'";

 

Here are my values (retrieved from form):

$vDesc=This is my vehicle test

$vImg1=1.jpg

$uid=test

$vName=My Car Model 000T

 

Here is the error message:

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 'SET vimg='1.jpg',SET user='test',SET log=now() where vname='My Car Model 000' at line 1

 

Please help...

 

Thanks a lot in advance.

Link to comment
https://forums.phpfreaks.com/topic/174922-solved-php-mysql-update-query-error/
Share on other sites

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.