Registry / database / greenlion-php-sql-parser

greenlion-php-sql-parser

JSON →
library4.7.0phppackagistunverified

A pure PHP SQL (non validating) parser w/ focus on MySQL dialect of SQL

composer require greenlion/php-sql-parser
INSTALL
IMPORT
SIG · GREENLION-PHP-SQL-
G
greenlion-php-sql-parser
databasephpv4.7.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PHPSQLParser
use PHPSQLParser\PHPSQLParser;

Parse a SQL query into an array structure

use PHPSQLParser\PHPSQLParser; $parser = new PHPSQLParser(); $parsed = $parser->parse('SELECT * FROM users WHERE id = 1'); print_r($parsed);
Debug
Known issues
gotchaParser does not validate SQL syntax; malformed queries may produce unexpected results
fix
Validate SQL separately before parsing or handle parser errors gracefully
affects: >=4.0.0
Upgrade
Version history
4.7.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
greenlion-php-sql-parser — pip install greenlion-php-sql-parser · libregistry