orphaned taxonomy terms remove by sql query

You shouldn’t need to use a custom SQL query – stick to the built-in method wp_delete_post(). This will also clear out all term relationships too.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)