Please note: We recommend the Use of Prepared Statements. The method preparedExecute is available for this purpose.
To execute SQL statements use the function exec for manipulating data (UPDATE, INSERT or DELETE statements). This function can then be executed on the previously instantiated class $jobDB. Pass the SQL statement to be executed as parameter to the method.
Parameter |
Type |
Description |
|---|---|---|
$sql |
string |
SQL statement |
In case of an error it will return false.
Example:
…
$sql = 'UPDATE INVOICES SET DATE = getdate()';
$result = $jobDB->exec($sql);
…