6 Select - AtjonTV/MySQLm Wiki

Select

Function executeSelect():

The executeSelect method can be used to select from Tables.

The function requieres the full SQL-Query without the SELECT 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->executeSelect('* FROM Users WHERE name="AtjonTV"');
$msql->executeSelect('* FROM Users WHERE name="AtjonTV"', false);

// Example with escapecharacters allowed
$msql->executeSelect('* FROM Users WHERE name="AtjonTV"', true);

SQL-Query:

SELECT * FROM Users WHERE name="AtjonTV";