O'Reilly logo

PHP and MySQL for Dynamic Web Sites: Visual Quickpro Guide, Second Edition by Larry Ullman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

SQL and MySQL Debugging Techniques

The most common SQL errors are caused by the following issues:

  • Unbalanced use of quotation marks or parentheses

  • Unescaped apostrophes in column values

  • Misspelling a column name, table name, or function

  • Ambiguously referring to a column in a join

  • Placing a query’s clauses (WHERE, GROUP BY, ORDER BY, LIMIT) in the wrong order

Furthermore, when using MySQL you can also run across the following:

  • Unpredictable or inappropriate query results

  • Inability to access the database

  • Difficulty starting MySQL

Since you’ll be running the queries for your dynamic Web sites from PHP, you need a methodology for debugging SQL and MySQL errors within that context (PHP will not report a problem with your SQL).

Debugging SQL problems

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required