What client and RDMS are you using? What are the problems? No rows updated? Too many rows updated? Wrong data inserted in the table? Error message from the client or from the RDMS?
At first glance, it would appear that you are trying to query the database using a SQL string generated in the client. The SQL string is stored into a variable and is created using other variables. However, the the other variables are not being interpreted by the client software. You are actually creating the SQL string using the names of the additional variables.
Try printing the SQL statement before executing it. Make sure it has the proper syntax and content. I would guess that you need to create the SQL statement with code similar to the following.
[tt]
$query = "update products
set productId='" & $productId & "',
name = '" & $name & "',
avail = '1',
catid = '" & $catid & "',
price = '" & $price & "',
lng_desc = '" & $lng_desc & "'
where productId = '" & $oldproductId';"[/tt] Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.