5 Insert - AtjonTV/MySQLm Wiki


Function executeInsert():

The executeInsert method can be used to insert into Tables.

The function requieres the full SQL-Query without the INSERT 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.


  1. SQL-Query


// Example with escapecharacters denyed
$msql->executeInsert('INTO Users (name, email) VALUES ("AtjonTV", "[email protected]"');
$msql->executeInsert('INTO Users (name, email) VALUES ("AtjonTV", "[email protected]"', false);

// Example with escapecharacters allowed
$msql->executeInsert('INTO Users (name, email) VALUES ("AtjonTV", "[email protected]"', true);


INSERT INTO Users (name, email) VALUES ("AtjonTV", "[email protected]";