WordPress.org

Ready to get started?Download WordPress

Forums

SQL: DELETE using a JOIN (1 post)

  1. kccricket
    Member
    Posted 8 years ago #

    According to one tutorial that I read, the following SQL statement is only valid for MySQL 4 and later:
    DELETE {$table_prefix}postmeta FROM {$table_prefix}postmeta JOIN {$table_prefix}posts ON ({$table_prefix}postmeta.post_id={$table_prefix}posts.ID) WHERE meta_key='$key' AND meta_value='$value' AND post_author=$user_ID

    What would be the most effective way to perform this type of query so that it will be compatible with MySQL 3?

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags