====== logSql ======
~~NOTOC~~
There is a performance overhead to logging the SQL statements, use only when necessary.
== Syntax ==
void logSql(
optional bool $enable=true
)
===== Description =====
The function ''logSql()'' enables or disables the query logging facility. Upon issuance of the command, all SQL statements executed are logged to the ''adodb_logsql'' table.
--------------------------------------------------------------------
===== Usage =====
/*
* Enable logging
*/
$db->logSql();
/*
* Execute a statement, it will be logged to the adodb_logsql table.
*/
$result = $db->execute("SELECT * FROM act");
/*
* Disable logging
*/
$db->logSql(false);