Need to delete specific records in My SQL DB (1 reply)

This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.
Submitted by programmer on Fri, 08/15/2008 - 08:28.

Hi,

I am a newbee as far as My SQL is concerned. I bought a website with a database full of products. I'd like to delete specific records. I want to delete those records with a price less than $4.95 and all products that don't have a photo.

The table is called 'goods'

Price is in the 'price' field ie. $6.95 is 695

Product photo is in the 'photoUrl' field ie. http://www.site.com/pic.jpg. The field is empty if no photo exists.

I'd like to run php and eventually make it a cron job. If someone could help me with the code, I'd appreciate it.

Regards,

Tom

Post Comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.