Originally Posted by durangod
I forgot to add the query does work in phpMyAdmin.
If the query works in phpmyadmin then there are no permissions problems. the error at that point will be something in your php code.
And that will be difficult to help with at this point since you don't show us the DELETE statement.