Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Simple (?) SQL query


Tamsyn

Recommended Posts

I'm running a sale in my shop. There was 20% off selected items all last week.

 

Today, I want to reduce those specials by a further 20%.

 

How can I update all the records in the specials table at once?

 

I've tried this query:

 

UPDATE specials ,
SET `specials_new_products_price`=`specials_new_products_price`*.8
WHERE `status`='1'

 

But it throws up an error. I'm not very proficient with SQL so I don't know what I'm doing wrong.

 

I could do it manually, but for 200+ records, I don't really want to.

 

Any ideas?

 

Tamsyn

Link to comment
Share on other sites

I'm running a sale in my shop. There was 20% off selected items all last week.

 

Today, I want to reduce those specials by a further 20%.

 

How can I update all the records in the specials table at once?

 

I've tried this query:

 

UPDATE specials ,
SET `specials_new_products_price`=`specials_new_products_price`*.8
WHERE `status`='1'

 

But it throws up an error. I'm not very proficient with SQL so I don't know what I'm doing wrong.

 

I could do it manually, but for 200+ records, I don't really want to.

 

Any ideas?

 

Tamsyn

 

What error ?

Your online success is Paramount.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...