Download the PHP package rob-lester-jr04/php-sql-parser without Composer
On this page you can find all versions of the php package rob-lester-jr04/php-sql-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rob-lester-jr04/php-sql-parser
More information about rob-lester-jr04/php-sql-parser
Files in rob-lester-jr04/php-sql-parser
Package php-sql-parser
Short Description A pure PHP SQL (non validating) parser w/ focus on MySQL dialect of SQL
License BSD-3-Clause
Homepage https://github.com/greenlion/PHP-SQL-Parser
Informations about the package php-sql-parser
PHP-SQL-Parser
A pure PHP SQL (non validating) parser w/ focus on MySQL dialect of SQL
Download
Full support for the MySQL dialect for the following statement types
SELECT
INSERT
UPDATE
DELETE
REPLACE
RENAME
SHOW
SET
DROP
CREATE INDEX
CREATE TABLE
EXPLAIN
DESCRIBE
Other SQL statement types
Other statements are returned as an array of tokens. This is not as structured as the information available about the above types. See the ParserManual for more information.
Other SQL dialects
Since the MySQL SQL dialect is very close to SQL-92, this should work for most database applications that need a SQL parser. If using another database dialect, then you may want to change the reserved words - see the ParserManual. It supports UNION, subqueries and compound statements.
External dependencies
The parser is a self contained class. It has no external dependencies. The parser uses a small amount of regex.
Focus
The focus of the parser is complete and accurate support for the MySQL SQL dialect. The focus is not on optimizing for performance. It is expected that you will present syntactically valid queries.
Manual
ParserManual - Check out the manual.
Example Output
Example Query
Example Output (via print_r)