ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:userguide:debug

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
v5:userguide:debug [2015/11/23 00:40]
mnewnham
v5:userguide:debug [2018/07/02 13:06] (current)
peterdd prefer functions start lowercase (#430)
Line 8: Line 8:
  
 ===== Description ===== ===== Description =====
-Enabling debug mode makes the driver return copious amounts of debugging information from both ADOdb and the PHP driver itself.Information is displayed on both standard output (STDOUT) and standard error (STDERR) channels. +Enabling debug mode makes the driver return copious amounts of debugging information from both ADOdb and the PHP driver itself. Information is displayed on both standard output (STDOUT) and standard error (STDERR) channels. 
 ===== Usage ===== ===== Usage =====
 The debug option can be enabled and disabled at any time, to debug portions of a program. The earliest it can be enabled is after the inclusion of the driver, and before the connection. In the following example, the table name is spelled incorrectly (it should be **products**). When run without debugging, the execution of the statement simply returns false. The debug option can be enabled and disabled at any time, to debug portions of a program. The earliest it can be enabled is after the inclusion of the driver, and before the connection. In the following example, the table name is spelled incorrectly (it should be **products**). When run without debugging, the execution of the statement simply returns false.
Line 18: Line 18:
 $conn->debug = true; $conn->debug = true;
 /* /*
-* Invalid syntax in select statment/ +* Invalid syntax in select statment 
-*. +*/ 
-$recordSet = $conn->Execute('select * from product');+$recordSet = $conn->execute('select * from product');
 </code> </code>
 The information returned on STDOUT is: The information returned on STDOUT is:
Line 49: Line 49:
   * Historically, the output messages were coded to be sent to a web page and some contain formatting that may make the messages more difficult to read.   * Historically, the output messages were coded to be sent to a web page and some contain formatting that may make the messages more difficult to read.
   * Some drivers, the SQL server driver in particular, produce overwhelming volumes of debugging information.   * Some drivers, the SQL server driver in particular, produce overwhelming volumes of debugging information.
 +
 +{{tag>[debugging]}}
v5/userguide/debug.1448235648.txt.gz · Last modified: 2017/04/21 11:39 (external edit)