Primarily for MySQL ``.sql`` files.
Can be used in git pre-commit hooks to catch errors.
+Use it from your shell, offline and without any SQL server.
+
+You can also use it to format SQL queries.
=====
Usage
=====
-::
+Syntax check::
$ php-sqllint tests/files/create-missingcomma.sql
Checking SQL syntax of tests/files/create-missingcomma.sql
tests/files/create-noname.sql:1.13:Error: At least one column definition was expected.
+Formatting::
+
+ $ php-sqllint --format tests/files/select-unformatted.sql
+ SELECT
+ id,
+ NAME,
+ url
+ FROM
+ users
+ WHERE
+ DATE > NOW() AND id != 0
+ ORDER BY NAME
+ LIMIT 10
+
+
+Syntax highlighting
+===================
+ANSI colors are applied automatically when not piping; you can use the
+``--highlight`` option to override the automatism.
+
+``--highlight`` option values:
+
+``none``
+ No highlighting. Use it to disable automatic highlighting
+``ansi``
+ ANSI escape codes for your shell
+``html``
+ HTML tags
+
+
====
Bugs
====
========
Building
========
+
+Preparation
+===========
+1. Write new version number into ``VERSION``
+
+
+Create the release
+==================
You'll need `phing`__, the PHP build tool::
$ phing