Posts

Showing posts from September, 2013

Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.

When I was trying to delete records from orderednotcompltedcarts tables when my customers order is succesfully placed. But when i tried to delete records form table by using below query delete from orderednotcompletecarts where custphone='1234567890'; it reports the above mentioned error :  Solution : -   It’s because I tried to update a table without a WHERE that uses a KEY column. The quick fix is to add SET SQL_SAFE_UPDATES=0; before delete query : SET SQL_SAFE_UPDATE=0 ; Or close the safe update mode  Go to  Edit -> Preferences -> SQL Queries and  disable Forbid UPDATE and DELETE statements with no key in where clause or no LIMIT clause.But you require to reconnect to make it available. Hope So You solve your problem with same solution. If not, then please update your problem in comments.