Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

removing reviews


Trusten

Recommended Posts

Posted

:oops: um, i kinda need some real help here. I wanted to write the review script to remove reviews ONLY if

 

reviews.products_id = products.products_id and products.products_id = 'blah'.

 

that's basically it, cept for the 'blah' part.

 

but i can fiddle with that later.

 

is there any way i can put that into the code. right now, it says 'delete from', and i've never really worked with delete from before.

Posted

you can use delete from no problem.

 

if i understand you wright, the syntax should be

 

delete from reviews where products_id = 'blah'

 

blah should then be a number, an id is always a number.

 

if you want to delete reveiws from a certain product with a name i think you should write a php script like

 

select products_id from products where name like 'blah'

 

// for each found products_id

delete from reviews where products_id = products_id

 

don't know if you can use an sql query to delete from one table using information from an onther.

Posted

i'm not sure we are communicating well, i'm sorry.

 

 

see, it's gonna be

 

 

review.products_id = product.products_id and product.products_price = 'blah'

 

that blah is a variable i'm going to i dentify. it's an id marker. i need to make sure this products_price (this is an example btw) equals that 'blah'.

 

 

without that 'blah', they should not be able to delete that review.

 

do you get me now?

Archived

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

×
×
  • Create New...