Safe Updates in PHPMyAdmin

2

In MySQL Workbench it has a very useful function called: "Safe Updates", which prevents Updates in a column without WHERE, for example.

In PHPMyAdmin, does this function exist? I could not find it.

    
asked by anonymous 02.06.2014 / 16:58

1 answer

1

You have a few options:

  • Remove from the user who accesses PHPMyAdmin the DELETE and UPDATE permission and create a stored procedure for these operations (which requires, among its parameters, the content of the WHERE clause)

  • You can create triggers that give ROLLBACK in the upda te if the number of rows updated is equal to the number of rows in the table (it can go wrong if other users insert records in parallel)

  • You can customize the MyAdmin PHP code (which is open) so that it validates the content of the query forms and prevents the user from submitting UPDATEs and DELETEs without where, of course, to do this, you need know the PHPMyAdmin code and need to be able to include such a change without crashing the rest of the functionality

03.06.2014 / 10:53