tedbooks Posted December 26, 2004 Posted December 26, 2004 hi i am having trouble with this line i want to put in phpmyadmin UPDATE `vendors` SET `vendors_url` = 'index.php/store_id/'. `vendors_id` gives me error 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 '. `vendors_id`' at line 1 please help
Guest Posted December 26, 2004 Posted December 26, 2004 Try: tep_db_query("UPDATE vendors SET vendors_url = 'index.php/store_id/". $vendors_id . "'"); Bit hard to say without seeing the remainder of your code :blink: Matti
tedbooks Posted December 26, 2004 Author Posted December 26, 2004 thanks johnson happy holidays i simply want to set all of my vendors_url in my vendors table to index.php/store_id/1 or index.php/store_is/2 and so on depending what the vendors_id in the vendors table is
Guest Posted December 26, 2004 Posted December 26, 2004 Ok - misundertood. Two queries: UPDATE vendors SET vendors_url = 'index.php/store_id/1' where vendors_id = '1'; UPDATE vendors SET vendors_url = 'index.php/store_id/2' where vendors_id = '2'; I am guessing your vendors_id's as you didn't say how to decide :D If you have more than the above it is simpler (to me) to write a query within a 'while' statement in a php script and execute that. Matti
Recommended Posts
Archived
This topic is now archived and is closed to further replies.