Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SQL query help


NCR2000

Recommended Posts

I need help making a SQL query that will do the following

 

Remove any products_attributes_id entries from the products_attributes table where options_id = 2 or 3

 

Could anyone help me with this?

 

not sure if I understand: you want to delete all lines from that table if options_id is 2 or 3? If yes, use this ... oh and before you do it, take a backup of your database, it may not be what you had planned to achieve.

 

delete from products_attributes where options_id = 2 or options_id = 3

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

not sure if I understand: you want to delete all lines from that table if options_id is 2 or 3? If yes, use this ... oh and before you do it, take a backup of your database, it may not be what you had planned to achieve.

 

delete from products_attributes where options_id = 2 or options_id = 3

 

 

Thanks,

 

I was using DROP instead of delete... wasn't working for some reason. It didn't even cross my mind to use DELETE

 

:)

Link to comment
Share on other sites

  • 2 weeks later...

Actually I came across a program called PHPedit that has one hell of a help file attached to it. It's helped me so much!

 

Anyone not set with a php editor yet should have a look at it, it's free for personal use.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...