1

I have a problem debugging some problem.

I started thread in wordpress.stackexchange.com thinking that I get more wordpress related debugging suggestions but went with totally different way.

You can see topic here: https://wordpress.stackexchange.com/questions/123394/some-ways-to-debug-code

with update: DELETE FROM wp_bp_activity WHERE item_id = 0

My Question is SQL related: Can DELETE statement be triggered from something then DELETE query? for example I rememeber having a bad query which was deleting everything. (but that was everything and not an if statment)

So to extend this question: If I search every query with DELETE FROM will I find it for sure? Can this be written differently? Because for now, I can't find it.

2
  • 1
    MySQL triggers? Commented Nov 16, 2013 at 18:45
  • 2
    Additional tuples could get deleted due to a ON DELETE CASCADE in the schema. Otherwise the WHERE clause or a trigger could be the culprit Commented Nov 16, 2013 at 18:45

1 Answer 1

2

TRUNCATE is also used to DELETE all the records from a table.

You can also have some kind of foreign key cascading, that is triggering the delete in that table. More here.

Addicionally, make sure to search on the database also, on triggers and on stored procedures

One other option is that they were updated to a different value than the one you are looking for.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.