Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

help with mysql statment


tedbooks

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...