Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
-
Stryks
- Forum Regular
- Posts: 746
- Joined: Wed Jan 14, 2004 5:06 pm
Post
by Stryks »
This update query used to run fine but now it just gives an error.
Code: Select all
UPDATE
`tbl_vendor_product_price`,
`tbl_vendor_product`
SET
`tbl_vendor_product_price`.`cost` = `tbl_vendor_product_price`.`cost` + '0.01'
WHERE
`tbl_vendor_product`.`VI_PK` = `tbl_vendor_product_price`.`VI_ID`
AND
`tbl_vendor_product_price`.`VS_ID` = '32'
AND
`tbl_vendor_product`.`TT_ID` = '2'
I have been doing some updating, so it's not impossible that something is changed, but I can see what could be wrong.
Any help here would be great.
Jcart | formated query for readability
-
Stryks
- Forum Regular
- Posts: 746
- Joined: Wed Jan 14, 2004 5:06 pm
Post
by Stryks »
Ahh ... A server reload appears to have me saddled with mysql 3.23.58, and I'm pretty sure update joins arent allowed before 4.04.
Will update and see what happens.
-
Stryks
- Forum Regular
- Posts: 746
- Joined: Wed Jan 14, 2004 5:06 pm
Post
by Stryks »
Yeah ... the error would be helpfule eh?
You have an error in your SQL syntax near ' tbl_vendor_product SET `cost` = `cost` + '0.01' WHERE `tbl_vendor_product`.`VI_' at line 1
About to update though, so that may fix it.