Support » Everything else WordPress » SQL: DELETE using a JOIN

  • 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?


  • The topic ‘SQL: DELETE using a JOIN’ is closed to new replies.