v5:userguide:debug
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
reference:debug [2015/11/29 01:49] – [Description] dregad | v5:userguide:debug [2022/08/21 19:11] – Updated the special options into the page mnewnham | ||
---|---|---|---|
Line 4: | Line 4: | ||
<WRAP right box> | <WRAP right box> | ||
== Syntax == | == Syntax == | ||
- | $connection-> | + | $connection-> |
</ | </ | ||
Line 11: | Line 11: | ||
===== 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. | ||
+ | |||
<code php> | <code php> | ||
Line 20: | Line 21: | ||
* Invalid syntax in select statment | * Invalid syntax in select statment | ||
*/ | */ | ||
- | $recordSet = $conn->Execute(' | + | $recordSet = $conn->execute(' |
</ | </ | ||
The information returned on STDOUT is: | The information returned on STDOUT is: | ||
Line 45: | Line 46: | ||
name is spelled correctly., SQL state S0002 in SQLExecDirect in C: | name is spelled correctly., SQL state S0002 in SQLExecDirect in C: | ||
</ | </ | ||
+ | |||
+ | By default, the parameters passed to each SQL statement to be executed are compressed into a set of key=> | ||
+ | |||
+ | ===== Special Options ===== | ||
+ | There are 3 non-boolean switches that, if set, will vary some of the output produce | ||
+ | ^Value^Description^ | ||
+ | |99|If set, then the results of a debug_backtrace will be appended to every database execution, **//even if the execution is successful// | ||
+ | |-1|If set, and the code is being run in a browser, then the line separators around the statement are suppressed. This option has no effect when the code is run in a CLI environment.| | ||
+ | |-99|If set, then the SQL statement print is suppressed, reducing the amount of output to STDOUT | | ||
===== Limitations ===== | ===== Limitations ===== | ||
v5/userguide/debug.txt · Last modified: 2024/01/09 11:20 by dregad