On Thursday 12 December 2002 18:48, Steve Jackson wrote: > It doesn't work in that it doesn't update the database. > I have a form which when loaded takes a variable ItemCode from the > previous page (which gets the Itemcode from the DB) and puts it into a > hidden field which I call oldItemCode, then when I try to update the > $ItemCode row in the database with the edited changes using the > oldItemCode as an identifier it won't update - It goes to my error > message shown below. So what I'm asking is there anything I'm doing > wrong. I noted your points about the comma and have changed the code. > > <? > $query = "update products > set ItemCode='$ItemCode', > ItemName ='$ItemName', > catid ='$catid', > price = '$price', > description = '$description', > shortdesc = '$shortdesc', > where ItemCode='$oldItemCode'"; > $result = mysql_query($query);
You've got an extra comma after '$shortdesc' which you should remove. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Conscious is when you are aware of something and conscience is when you wish you weren't. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php