Within the products_to_categories table, I need to change too many categories_id values from 25 to 26. It would be easy if ALL 25s were to be changed but only some of them need to be changed. I thought I had done this before because I have in my "working mysql scripts" folder the following snippet of code:
[FONT="Courier New"]UPDATE `zen_products_to_categories` SET `categories_id` = '26' WHERE (products_id, categories_id) = '434', '25';
UPDATE `zen_products_to_categories` SET `categories_id` = '26' WHERE (products_id, categories_id) = '435', '25';
UPDATE `zen_products_to_categories` SET `categories_id` = '26' WHERE (products_id, categories_id) = '439', '25';[/FONT]
Unfortunately, I am getting the following SQL error message:
[FONT="Courier New"]Error
SQL query:
UPDATE `zen_products_to_categories` SET `categories_id` = '26' WHERE (
products_id,
categories_id
) = '434',
'25';
MySQL said: Documentation
#1064 - 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 ' '25'' at line 1 [/FONT]
What is the proper SQL code (MySQL version is "5.0.81-community")? Do I need to include database/table names in some manner and if so, how do I do that again?
Thank you!






Bookmarks