ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:performance:logsql

This is an old revision of the document!


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.1452647654.txt.gz · Last modified: 2017/04/21 11:30 (external edit)