-
Notifications
You must be signed in to change notification settings - Fork 290
Troubleshooting
Below are some basic troubleshooting guidelines when using ezSQL.
Click any of the methods in the Table of Contents (ToC) below to be taken to the detailed documentation.
$db->debug -- print last sql query and returned results (if any)
$db->debugOn -- turns the debug echo on to use the $db->debug()
method
$db->debugOff -- turns the debug echo off disabling the $db->debug()
method
$db->vardump -- print the contents and structure of any variable
$db->hide_errors -- turn ezsql error output to browser off
$db->show_errors -- turn ezsql error output to browser on
Overview
Running this method will print a debug result of the last successful sql query and returned results (if any)
Note: Requires
$db->debugOn();
or$db->setDebug_Echo_Is_On(true);
to print anything out on the page.
Example Use
If you need to know what your last query was and what the returned results are here is how you do it.
<?php
// Set debug on
$db->debugOn();
// Run a query
$users = $db->get_results(“SELECT name, email FROM users”);
// Debug the output/See what just happened!
$db->debug();