I already reviewed most of the topics related to my concern
detect mysql errors without executing it
Most of the examples are just using Select statements. Mine is about UPDATE
and DELETE
.
Is there a way to get the possible error return using PHP to check the update/delete query before execution?
My concern is about foreign key constraint
.
I already have Php script before but now I guess will try to use EXPLAIN.
Before I was using mysql_error()
to get the errors but of course the query must be executed to get errors and translate it to understandable message.
Lets say, how I can I use "Explain Delete ..." statement to get some information about errors?
or is "Explain" the right tool?
Query: Delete From project
.
I have another table called project_assignment
with index FK to Project_ID of project table and has data on it.
Right now, I only got this
id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra
1 |SIMPLE |NULL | NULL | NULL | NULL| NULL | NULL|2 | Deleting all rows