Skip to content
Damien edited this page Aug 30, 2019 · 8 revisions

ezSQL Troubleshooting Guide

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.

Troubleshooting Methods Table of Contents

$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

Detailed Documentation

$db->debug

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();
Clone this wiki locally