5 Insert - AtjonTV/MySQLm GitHub Wiki
Insert
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 atrue
boolean value.
Structure:
- SQL-Query
Example:
// 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);
SQL-Query:
INSERT INTO Users (name, email) VALUES ("AtjonTV", "[email protected]";