ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:performance:logsql

logSql

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);
v5/performance/logsql.txt · Last modified: 2021/08/22 22:04 by peterdd