7 Update - AtjonTV/MySQLm Wiki

Update

Function executeUpdate():

The executeUpdate method can be used to update in Tables.

The function requieres the full SQL-Query without the UPDATE keyword.

This method is SQL-Injection save by default. To disable SQL-Injection-Prevention in order to use escapecharacters like ', you need to supply a true boolean value.

Structure:

  1. SQL-Query

Example:

// Example with escapecharacters denyed
$msql->executeUpdate('Users SET email="[email protected]" WHERE email="[email protected]"');
$msql->executeUpdate('Users SET email="[email protected]" WHERE email="[email protected]"', false);

// Example with escapecharacters allowed
$msql->executeUpdate('Users SET email="[email protected]" WHERE email="[email protected]"', true);

SQL-Query:

UPDATE Users SET email="[email protected]" WHERE email="[email protected]";