chrometweaks.org

Free iPage web host that supports cron jobs and remote smtp access?

Click Here To View All Answers...


Got a question, hope someone can answer... Free iPage web host that supports cron jobs and remote smtp access? Hoping for any answer. Second question.. How I delete all products from database where is price 0 USD. Thank you David..

Comments (7)

I would like to know the answer too. Anyone here know what is the answer. I'll do some research and get back to you if I find an anything. You should email the people at iPage as they probably know..

Comment #1

Its not quite so simple - there are nine database tables that may have info for a particular product.

Matti..

Comment #2

Just out of curiosity, matti, what nine are you counting?.

I don't count that many, but you would probably know better than I..

If you give me the nine tables, I'll write the query that will delete al of the products that have a price of 0...

Comment #3

I just counted all that had 'products' in the name.

But I think only these:.

Products.

Products_attributes.

Products_attributes_download.

Products_description.

Products_notifications.

Products_to_categories.

Matti..

Comment #4

This should work..

Please backup first. I didn't run it first, but I think it's ok..

Delete pc.*.

From products_to_categories  pc, products p.

Where p.products_id = pc.products_id and p.products_price = 0.

Delete pn.*.

From products_notifications pn, products p.

Where p.products_id = pn.products_id and p.products_price = 0.

Delete pd.*.

From products_description pd, products p.

Where p.products_id = pd.products_id and p.products_price = 0.

Delete pad.*.

From products_attributes_download pad, products_attributes pa, products p.

Where pad.products_attributes_id = pa.products_attributes_id and p.products_id = pa.products_id and p.products_price = 0.

Delete pa.*.

From products_attributes pa, products p.

Where p.products_id = pa.products_id and p.products_price = 0.

Delete p.*.

From products p.

Where p.products_price = 0..

Comment #5

This is my file delete.php - dont work.

Delete pc.*.

From products_to_categories pc, products p.

Where p.products_id = pc.products_id and p.products_price = 0.

Delete pn.*.

From products_notifications pn, products p.

Where p.products_id = pn.products_id and p.products_price = 0.

Delete pd.*.

From products_description pd, products p.

Where p.products_id = pd.products_id and p.products_price = 0.

Delete pad.*.

From products_attributes_download pad, products_attributes pa, products p.

Where pad.products_attributes_id = pa.products_attributes_id and p.products_id = pa.products_id and p.products_price = 0.

Delete pa.*.

From products_attributes pa, products p.

Where p.products_id = pa.products_id and p.products_price = 0.

Delete p.*.

From products p.

Where p.products_price = 0.

The result is only screen where is write this code..

This:.

Delete pc.* from products_to_categories pc, products p where p.products_id = pc.products_id and p.products_price = 0 delete pn.* from products_notifications pn, products p where p.products_id = pn.products_id and p.products_price = 0 delete pd.* from products_description pd, products p where p.products_id = pd.products_id and p.products_price = 0 delete pad.* from products_attributes_download pad, products_attributes pa, products p where pad.products_attributes_id = pa.products_attributes_id and p.products_id = pa.products_id and p.products_price = 0 delete pa.* from products_attributes pa, products p where p.products_id = pa.products_id and p.products_price = 0 delete p.* from products p where p.products_price = 0.

[B].

Donť delete products from database...

Comment #6

Me working too late again and you by the looks of it matti........

Comment #7

OK..

Otherwise.

How can I set status of products which price is 0 to status OFF..

In all of database..

Comment #8


This question was taken from a support group/message board and re-posted here so others can learn from it.