Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Nested Update error


mindtriq

Recommended Posts

Hello,

 

Since I expect this problem to have less to do with OSC and more with MySQL, I'll answer to upcoming 'check the mysql forum' replies with the following: I tried, dead end.

 

Now, as perhaps more of you have encountered this; the real problem.

Performing the following query on MySQL 4.0.15:

 

====

SQL-query:

 

UPDATE products_to_categories SET categories_id =166 WHERE (

categories_id =78 AND products_id IN (

SELECT p.products_id

FROM products p

WHERE p.products_status =0

)

)

 

MySQL said:

 

#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 'SELECT p.products_id

FROM products p

WHERE p.products_statu

====

 

Now, both the update query and the select query seem to work fine, stand-alone. Although, as soon as I try to combine them.. this error occurs.

 

Many thanks in advance.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...