PHP Classes

PHP SQL Parser Class: Parse SQL to extract the SQL query structure

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 123 All time: 9,468 This week: 41Up
Version License PHP version Categories
php-sql-parser 1.0.0GNU General Publi...5PHP 5, Databases, Parsers
Description 

Authors

Justin Swanhart
André Rothe


Contributor

This package can parse SQL to extract the SQL query structure.

It can take as parameter a SQL query string and returns the structure of a query split into its parts.

The package returns an associative array with the information of its parts like the query type, options, field names, values, where condition clause, etc..

Picture of Michael Cummings
  Performance   Level  
Name: Michael Cummings <contact>
Classes: 9 packages by
Country: United States United States
Age: ???
All time rank: 1895263 in United States United States
Week rank: 43 Up5 in United States United States Up
Innovation award
Innovation award
Nominee: 7x

Winner: 1x

Example

<?php

/**
 * you cannot execute this script within Eclipse PHP
 * because of the limited output buffer. Try to run it
 * directly within a shell.
 */

namespace PHPSQLParser;
require_once
dirname(__FILE__) . '/../vendor/autoload.php';

$sql = 'SELECT 1';
echo
$sql . "\n";
$start = microtime(true);
$parser = new PHPSQLParser($sql, true);
$stop = microtime(true);
print_r($parser->parsed);
echo
"parse time simplest query:" . ($stop - $start) . "\n";

/*You can use the constuctor for parsing. The parsed statement is stored at the ->parsed property.*/
$sql = 'REPLACE INTO table (a,b,c) VALUES (1,2,3)';
echo
$sql . "\n";
$start = microtime(true);
$parser = new PHPSQLParser($sql);
$stop = microtime(true);
print_r($parser->parsed);
echo
"parse time very somewhat simple statement:" . ($stop - $start) . "\n";

/* You can use the ->parse() method too. The parsed structure is returned, and
   also available in the ->parsed property. */
$sql = 'SELECT a,b,c
          from some_table an_alias
    where d > 5;'
;
echo
$sql . "\n";
print_r($parser->parse($sql, true));

$sql = 'SELECT a,b,c
          from some_table an_alias
      join `another` as `another table` using(id)
    where d > 5;'
;
echo
$sql . "\n";
$parser = new PHPSQLParser($sql, true);
print_r($parser->parsed);

$sql = 'SELECT a,b,c
          from some_table an_alias
      join (select d, max(f) max_f
                 from some_table
                where id = 37
                group by d) `subqry` on subqry.d = an_alias.d
    where d > 5;'
;
echo
$sql . "\n";
$parser = new PHPSQLParser($sql);
print_r($parser->parsed);

$sql = "(select `c2`, `c```, \"quoted \'string\' \\\" with `embedded`\\\"\\\" quotes\" as `an``alias` from table table)
UNION ALL (select `c2`, `c```, \"quoted \'string\' \\\" with `embedded`\\\"\\\" quotes\" as `an``alias` from table table)"
;
$parser = new PHPSQLParser($sql);
print_r($parser->parsed);

$sql = "(select `c2`, `c```, \"quoted \'string\' \\\" with `embedded`\\\"\\\" quotes\" as `an``alias` from table table)
UNION (select `c2`, `c```, \"quoted \'string\' \\\" with `embedded`\\\"\\\" quotes\" as `an``alias` from table table)"
;
$parser = new PHPSQLParser($sql);
print_r($parser->parsed);

$sql = "select `c2`, `c```, \"quoted \'string\' \\\" with `embedded`\\\"\\\" quotes\" as `an``alias` from table table";
echo
$sql . "\n";
$parser = new PHPSQLParser($sql);
print_r($parser->parsed);

$sql = "alter table xyz add key my_key(a,b,c), drop primay key";
echo
$sql . "\n";
$parser = new PHPSQLParser($sql);
print_r($parser->parsed);

$sql = 'INSERT INTO table (a,b,c) VALUES (1,2,3)
  ON DUPLICATE KEY UPDATE id=LAST_INSERT_ID(id), c=3;'
;
echo
$sql . "\n";
$parser = new PHPSQLParser($sql);
print_r($parser->parsed);

$sql = 'UPDATE t1 SET col1 = col1 + 1, col2 = col1;';
echo
$sql . "\n";
$parser = new PHPSQLParser($sql);
print_r($parser->parsed);

$sql = 'DELETE FROM t1, t2 USING t1 INNER JOIN t2 INNER JOIN t3
WHERE t1.id=t2.id AND t2.id=t3.id;'
;
echo
$sql . "\n";
$parser = new PHPSQLParser($sql);
print_r($parser->parsed);

$sql = 'delete low_priority partitioned_table.* from partitioned_table where partition_id = 1;';
echo
$sql . "\n";
$parser = new PHPSQLParser($sql);
print_r($parser->parsed);

$sql = "UPDATE t1 SET col1 = col1 + 1, col2 = col1;";
echo
$sql . "\n";
$parser = new PHPSQLParser($sql);
print_r($parser->parsed);

$sql = 'insert into partitioned_table (partition_id, some_col) values (1,2);';
echo
$sql . "\n";
$parser = new PHPSQLParser($sql);
print_r($parser->parsed);

$sql = 'delete from partitioned_table where partition_id = 1;';
echo
$sql . "\n";
$parser = new PHPSQLParser($sql);
print_r($parser->parsed);

$sql = 'SELECT 1';
echo
$sql . "\n";
$parser = new PHPSQLParser($sql);
print_r($parser->parsed);

$sql = 'SHOW TABLE STATUS';
echo
$sql . "\n";
$parser = new PHPSQLParser($sql);
print_r($parser->parsed);

$sql = 'SHOW TABLES';
echo
$sql . "\n";
$parser = new PHPSQLParser($sql);
print_r($parser->parsed);

$sql = 'select DISTINCT 1+2 c1, 1+ 2 as
`c2`, sum(c2),"Status" = CASE
        WHEN quantity > 0 THEN \'in stock\'
        ELSE \'out of stock\'
        END
, t4.c1, (select c1+c2 from t1 inner_t1 limit 1) as subquery into @a1, @a2, @a3 from t1 the_t1 left outer join t2 using(c1,c2) join t3 as tX on tX.c1 = the_t1.c1 natural join t4 t4_x using(cX) where c1 = 1 and c2 in (1,2,3, "apple") and exists ( select 1 from some_other_table another_table where x > 1) and ("zebra" = "orange" or 1 = 1) group by 1, 2 having sum(c2) > 1 ORDER BY 2, c1 DESC LIMIT 0, 10 into outfile "/xyz" FOR UPDATE LOCK IN SHARE MODE'
;

echo
$sql . "\n";
$parser = new PHPSQLParser($sql);
print_r($parser->parsed);

$sql = "(select 1, 1, 1, 1 from dual dual1) union all (select 2, 2, 2, 2 from dual dual2) union all (select c1,c2,c3,sum(c4) from (select c1,c2,c3,c4 from a_table where c2 = 1) subquery group by 1,2,3) limit 10";
echo
$sql . "\n";
$parser = new PHPSQLParser($sql);
print_r($parser->parsed);

$sql = 'select DISTINCT 1+2 c1, 1+ 2 as
`c2`, sum(c2),"Status" = CASE
        WHEN quantity > 0 THEN "in stock"
        ELSE "out of stock"
        END
, t4.c1, (select c1+c2 from t1 table limit 1) as subquery into @a1, @a2, @a3 from `table` the_t1 left outer join t2 using(c1,c2) join
(select a, b, length(concat(a,b,c)) from ( select 1 a,2 b,3 c from some_Table ) table ) subquery_in_from join t3 as tX on tX.c1 = the_t1.c1 natural join t4 t4_x using(cX) where c1 = 1 and c2 in (1,2,3, "apple") and exists ( select 1 from some_other_table another_table where x > 1) and ("zebra" = "orange" or 1 = 1) group by 1, 2 having sum(c2) > 1 ORDER BY 2, c1 DESC LIMIT 0, 10 into outfile "/xyz" FOR UPDATE LOCK IN SHARE MODE
UNION ALL
SELECT NULL,NULL,NULL,NULL,NULL FROM DUAL LIMIT 1'
;

$start = microtime(true);
$parser = new PHPSQLParser($sql);
$stop = microtime(true);
echo
"Parse time highly complex statement: " . ($stop - $start) . "\n";

?>


Details

PHP-SQL-Parser

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

Download

GitHub Wiki<br>


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

SELECT STRAIGHT_JOIN a, b, c 
  FROM some_table an_alias
 WHERE d > 5;

Example Output (via print_r)

Array
( 
    [OPTIONS] => Array
        (
            [0] => STRAIGHT_JOIN
        )       
        
    [SELECT] => Array
        (
            [0] => Array
                (
                    [expr_type] => colref
                    [base_expr] => a
                    [sub_tree] => 
                    [alias] => `a`
                )

            [1] => Array
                (
                    [expr_type] => colref
                    [base_expr] => b
                    [sub_tree] => 
                    [alias] => `b`
                )

            [2] => Array
                (
                    [expr_type] => colref
                    [base_expr] => c
                    [sub_tree] => 
                    [alias] => `c`
                )

        )

    [FROM] => Array
        (
            [0] => Array
                (
                    [table] => some_table
                    [alias] => an_alias
                    [join_type] => JOIN
                    [ref_type] => 
                    [ref_clause] => 
                    [base_expr] => 
                    [sub_tree] => 
                )

        )

    [WHERE] => Array
        (
            [0] => Array
                (
                    [expr_type] => colref
                    [base_expr] => d
                    [sub_tree] => 
                )

            [1] => Array
                (
                    [expr_type] => operator
                    [base_expr] => >
                    [sub_tree] => 
                )

            [2] => Array
                (
                    [expr_type] => const
                    [base_expr] => 5
                    [sub_tree] => 
                )

        )

)

  Files folder image Files (575)  
File Role Description
Files folder image.settings (4 files)
Files folder imageexamples (2 files)
Files folder imagelibs (1 directory)
Files folder imagesrc (1 directory)
Files folder imagetests (2 files, 2 directories)
Files folder imagevendor (1 file)
Files folder imagewiki (5 files)
Accessible without login Plain text file .buildpath Data Auxiliary data
Accessible without login Plain text file .eclipse-PHP-formatter.xml Data Auxiliary data
Accessible without login Plain text file .project Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (575)  /  .settings  
File Role Description
  Accessible without login Plain text file org.eclipse.ltk.core.refactoring.prefs Data Auxiliary data
  Accessible without login Plain text file org.eclipse.php.core.prefs Data Auxiliary data
  Accessible without login Plain text file org.eclipse.php.de...s_Preferences.prefs Data Auxiliary data
  Accessible without login Plain text file org.eclipse.php.ui.prefs Data Auxiliary data

  Files folder image Files (575)  /  examples  
File Role Description
  Accessible without login Plain text file example.php Example Example script
  Plain text file OracleSQLTranslator.php Class Class source

  Files folder image Files (575)  /  libs  
File Role Description
Files folder imagecodesniffer (1 file, 1 directory)

  Files folder image Files (575)  /  libs  /  codesniffer  
File Role Description
Files folder imagePhOSCo (1 file, 1 directory)
  Accessible without login Plain text file usage.txt Doc. Documentation

  Files folder image Files (575)  /  libs  /  codesniffer  /  PhOSCo  
File Role Description
Files folder imageSniffs (4 directories)
  Accessible without login Plain text file ruleset.xml Data Auxiliary data

  Files folder image Files (575)  /  libs  /  codesniffer  /  PhOSCo  /  Sniffs  
File Role Description
Files folder imageClasses (1 file)
Files folder imageCommenting (2 files)
Files folder imageControlStructures (1 file)
Files folder imageFunctions (1 file)

  Files folder image Files (575)  /  libs  /  codesniffer  /  PhOSCo  /  Sniffs  /  Classes  
File Role Description
  Plain text file ClassDeclarationSniff.php Class Class source

  Files folder image Files (575)  /  libs  /  codesniffer  /  PhOSCo  /  Sniffs  /  Commenting  
File Role Description
  Plain text file ClassCommentSniff.php Class Class source
  Plain text file FileCommentSniff.php Class Class source

  Files folder image Files (575)  /  libs  /  codesniffer  /  PhOSCo  /  Sniffs  /  ControlStructures  
File Role Description
  Plain text file MultiLineConditionSniff.php Class Class source

  Files folder image Files (575)  /  libs  /  codesniffer  /  PhOSCo  /  Sniffs  /  Functions  
File Role Description
  Plain text file FunctionDeclarationSniff.php Class Class source

  Files folder image Files (575)  /  src  
File Role Description
Files folder imagePHPSQLParser (2 files, 6 directories)

  Files folder image Files (575)  /  src  /  PHPSQLParser  
File Role Description
Files folder imagebuilders (100 files)
Files folder imageexceptions (4 files)
Files folder imagelexer (2 files)
Files folder imagepositions (1 file)
Files folder imageprocessors (44 files)
Files folder imageutils (3 files)
  Plain text file PHPSQLCreator.php Class Class source
  Plain text file PHPSQLParser.php Class Class source

  Files folder image Files (575)  /  src  /  PHPSQLParser  /  builders  
File Role Description
  Plain text file AliasBuilder.php Class Class source
  Plain text file AliasReferenceBuilder.php Class Class source
  Plain text file BracketStatementBuilder.php Class Class source
  Plain text file Builder.php Class Class source
  Plain text file CharacterSetBuilder.php Class Class source
  Plain text file CheckBuilder.php Class Class source
  Plain text file CollationBuilder.php Class Class source
  Plain text file ColumnDefinitionBuilder.php Class Class source
  Plain text file ColumnListBuilder.php Class Class source
  Plain text file ColumnReferenceBuilder.php Class Class source
  Plain text file ColumnTypeBracketExpressionBuilder.php Class Class source
  Plain text file ColumnTypeBuilder.php Class Class source
  Plain text file ConstantBuilder.php Class Class source
  Plain text file ConstraintBuilder.php Class Class source
  Plain text file CreateBuilder.php Class Class source
  Plain text file CreateIndexBuilder.php Class Class source
  Plain text file CreateIndexOptionsBuilder.php Class Class source
  Plain text file CreateIndexTableBuilder.php Class Class source
  Plain text file CreateIndexTypeBuilder.php Class Class source
  Plain text file CreateStatementBuilder.php Class Class source
  Plain text file CreateTableBuilder.php Class Class source
  Plain text file CreateTableDefinitionBuilder.php Class Class source
  Plain text file CreateTableOptionsBuilder.php Class Class source
  Plain text file CreateTableSelectOptionBuilder.php Class Class source
  Plain text file DatabaseBuilder.php Class Class source
  Plain text file DataTypeBuilder.php Class Class source
  Plain text file DefaultValueBuilder.php Class Class source
  Plain text file DeleteBuilder.php Class Class source
  Plain text file DeleteStatementBuilder.php Class Class source
  Plain text file DirectionBuilder.php Class Class source
  Plain text file DropExpressionBuilder.php Class Class source
  Plain text file DropStatementBuilder.php Class Class source
  Plain text file EngineBuilder.php Class Class source
  Plain text file ForeignKeyBuilder.php Class Class source
  Plain text file ForeignRefBuilder.php Class Class source
  Plain text file FromBuilder.php Class Class source
  Plain text file FunctionBuilder.php Class Class source
  Plain text file GroupByAliasBuilder.php Class Class source
  Plain text file GroupByBuilder.php Class Class source
  Plain text file HavingBracketExpressionBuilder.php Class Class source
  Plain text file HavingBuilder.php Class Class source
  Plain text file HavingExpressionBuilder.php Class Class source
  Plain text file IndexAlgorithmBuilder.php Class Class source
  Plain text file IndexColumnBuilder.php Class Class source
  Plain text file IndexCommentBuilder.php Class Class source
  Plain text file IndexHintListBuilder.php Class Class source
  Plain text file IndexKeyBuilder.php Class Class source
  Plain text file IndexLockBuilder.php Class Class source
  Plain text file IndexParserBuilder.php Class Class source
  Plain text file IndexSizeBuilder.php Class Class source
  Plain text file IndexTypeBuilder.php Class Class source
  Plain text file InListBuilder.php Class Class source
  Plain text file InsertBuilder.php Class Class source
  Plain text file InsertColumnListBuilder.php Class Class source
  Plain text file InsertStatementBuilder.php Class Class source
  Plain text file JoinBuilder.php Class Class source
  Plain text file LikeBuilder.php Class Class source
  Plain text file LikeExpressionBuilder.php Class Class source
  Plain text file LimitBuilder.php Class Class source
  Plain text file OperatorBuilder.php Class Class source
  Plain text file OrderByAliasBuilder.php Class Class source
  Plain text file OrderByBracketExpressionBuilder.php Class Class source
  Plain text file OrderByBuilder.php Class Class source
  Plain text file OrderByColumnReferenceBuilder.php Class Class source
  Plain text file OrderByExpressionBuilder.php Class Class source
  Plain text file OrderByFunctionBuilder.php Class Class source
  Plain text file OrderByReservedBuilder.php Class Class source
  Plain text file PositionBuilder.php Class Class source
  Plain text file PrimaryKeyBuilder.php Class Class source
  Plain text file ProcedureBuilder.php Class Class source
  Plain text file QueryBuilder.php Class Class source
  Plain text file RecordBuilder.php Class Class source
  Plain text file RefClauseBuilder.php Class Class source
  Plain text file RefTypeBuilder.php Class Class source
  Plain text file RenameStatementBuilder.php Class Class source
  Plain text file ReservedBuilder.php Class Class source
  Plain text file SchemaBuilder.php Class Class source
  Plain text file SelectBracketExpressionBuilder.php Class Class source
  Plain text file SelectBuilder.php Class Class source
  Plain text file SelectExpressionBuilder.php Class Class source
  Plain text file SelectStatementBuilder.php Class Class source
  Plain text file SetBuilder.php Class Class source
  Plain text file SetExpressionBuilder.php Class Class source
  Plain text file ShowBuilder.php Class Class source
  Plain text file ShowStatementBuilder.php Class Class source
  Plain text file SignBuilder.php Class Class source
  Plain text file SubQueryBuilder.php Class Class source
  Plain text file SubTreeBuilder.php Class Class source
  Plain text file TableBracketExpressionBuilder.php Class Class source
  Plain text file TableBuilder.php Class Class source
  Plain text file TableExpressionBuilder.php Class Class source
  Plain text file TempTableBuilder.php Class Class source
  Plain text file UpdateBuilder.php Class Class source
  Plain text file UpdateStatementBuilder.php Class Class source
  Plain text file UserVariableBuilder.php Class Class source
  Plain text file ValuesBuilder.php Class Class source
  Plain text file ViewBuilder.php Class Class source
  Plain text file WhereBracketExpressionBuilder.php Class Class source
  Plain text file WhereBuilder.php Class Class source
  Plain text file WhereExpressionBuilder.php Class Class source

  Files folder image Files (575)  /  src  /  PHPSQLParser  /  exceptions  
File Role Description
  Plain text file InvalidParameterException.php Class Class source
  Plain text file UnableToCalculatePositionException.php Class Class source
  Plain text file UnableToCreateSQLException.php Class Class source
  Plain text file UnsupportedFeatureException.php Class Class source

  Files folder image Files (575)  /  src  /  PHPSQLParser  /  lexer  
File Role Description
  Plain text file LexerSplitter.php Class Class source
  Plain text file PHPSQLLexer.php Class Class source

  Files folder image Files (575)  /  src  /  PHPSQLParser  /  positions  
File Role Description
  Plain text file PositionCalculator.php Class Class source

  Files folder image Files (575)  /  src  /  PHPSQLParser  /  processors  
File Role Description
  Plain text file AbstractProcessor.php Class Class source
  Plain text file BracketProcessor.php Class Class source
  Plain text file ColumnDefinitionProcessor.php Class Class source
  Plain text file ColumnListProcessor.php Class Class source
  Plain text file CreateDefinitionProcessor.php Class Class source
  Plain text file CreateProcessor.php Class Class source
  Plain text file DefaultProcessor.php Class Class source
  Plain text file DeleteProcessor.php Class Class source
  Plain text file DescProcessor.php Class Class source
  Plain text file DescribeProcessor.php Class Class source
  Plain text file DropProcessor.php Class Class source
  Plain text file DuplicateProcessor.php Class Class source
  Plain text file ExplainProcessor.php Class Class source
  Plain text file ExpressionListProcessor.php Class Class source
  Plain text file FromProcessor.php Class Class source
  Plain text file GroupByProcessor.php Class Class source
  Plain text file HavingProcessor.php Class Class source
  Plain text file IndexColumnListProcessor.php Class Class source
  Plain text file IndexProcessor.php Class Class source
  Plain text file InsertProcessor.php Class Class source
  Plain text file IntoProcessor.php Class Class source
  Plain text file LimitProcessor.php Class Class source
  Plain text file OptionsProcessor.php Class Class source
  Plain text file OrderByProcessor.php Class Class source
  Plain text file PartitionDefinitionProcessor.php Class Class source
  Plain text file PartitionOptionsProcessor.php Class Class source
  Plain text file RecordProcessor.php Class Class source
  Plain text file ReferenceDefinitionProcessor.php Class Class source
  Plain text file RenameProcessor.php Class Class source
  Plain text file ReplaceProcessor.php Class Class source
  Plain text file SelectExpressionProcessor.php Class Class source
  Plain text file SelectProcessor.php Class Class source
  Plain text file SetProcessor.php Class Class source
  Plain text file ShowProcessor.php Class Class source
  Plain text file SQLChunkProcessor.php Class Class source
  Plain text file SQLProcessor.php Class Class source
  Plain text file SubpartitionDefinitionProcessor.php Class Class source
  Plain text file TableProcessor.php Class Class source
  Plain text file UnionProcessor.php Class Class source
  Plain text file UpdateProcessor.php Class Class source
  Plain text file UsingProcessor.php Class Class source
  Plain text file ValuesProcessor.php Class Class source
  Plain text file WhereProcessor.php Class Class source
  Plain text file WithProcessor.php Class Class source

  Files folder image Files (575)  /  src  /  PHPSQLParser  /  utils  
File Role Description
  Plain text file ExpressionToken.php Class Class source
  Plain text file ExpressionType.php Class Class source
  Plain text file PHPSQLParserConstants.php Class Class source

  Files folder image Files (575)  /  tests  
File Role Description
Files folder imagecases (1 file, 2 directories)
Files folder imageexpected (2 directories)
  Accessible without login Plain text file bootstrap.php Aux. Auxiliary script
  Accessible without login Plain text file readme.txt Doc. Documentation

  Files folder image Files (575)  /  tests  /  cases  
File Role Description
Files folder imagecreator (55 files)
Files folder imageparser (92 files)
  Plain text file AbstractTestCase.php Class Class source

  Files folder image Files (575)  /  tests  /  cases  /  creator  
File Role Description
  Plain text file ascTest.php Class Class source
  Plain text file count_distinctTest.php Class Class source
  Plain text file deleteTest.php Class Class source
  Plain text file functionTest.php Class Class source
  Plain text file inlistTest.php Class Class source
  Plain text file insertTest.php Class Class source
  Plain text file issue100Test.php Class Class source
  Plain text file issue101Test.php Class Class source
  Plain text file issue102Test.php Class Class source
  Plain text file issue104Test.php Class Class source
  Plain text file issue105Test.php Class Class source
  Plain text file issue106Test.php Class Class source
  Plain text file issue110Test.php Class Class source
  Plain text file issue112Test.php Class Class source
  Plain text file issue117Test.php Class Class source
  Plain text file issue118Test.php Class Class source
  Plain text file issue121Test.php Class Class source
  Plain text file issue123Test.php Class Class source
  Plain text file issue124Test.php Class Class source
  Plain text file issue126Test.php Class Class source
  Plain text file issue127Test.php Class Class source
  Plain text file issue129Test.php Class Class source
  Plain text file issue130Test.php Class Class source
  Plain text file issue131Test.php Class Class source
  Plain text file issue132Test.php Class Class source
  Plain text file issue134Test.php Class Class source
  Plain text file issue141Test.php Class Class source
  Plain text file issue144Test.php Class Class source
  Plain text file issue147Test.php Class Class source
  Plain text file issue33Test.php Class Class source
  Plain text file issue57Test.php Class Class source
  Plain text file issue58Test.php Class Class source
  Plain text file issue62Test.php Class Class source
  Plain text file issue63Test.php Class Class source
  Plain text file issue66Test.php Class Class source
  Plain text file issue76Test.php Class Class source
  Plain text file issue78Test.php Class Class source
  Plain text file issue79Test.php Class Class source
  Plain text file issue81Test.php Class Class source
  Plain text file issue83Test.php Class Class source
  Plain text file issue85Test.php Class Class source
  Plain text file issue86Test.php Class Class source
  Plain text file issue87Test.php Class Class source
  Plain text file issue88Test.php Class Class source
  Plain text file issue89Test.php Class Class source
  Plain text file issue92Test.php Class Class source
  Plain text file issue94Test.php Class Class source
  Plain text file issue98Test.php Class Class source
  Plain text file issue_git10Test.php Class Class source
  Plain text file joinTest.php Class Class source
  Plain text file leftTest.php Class Class source
  Plain text file magnusTest.php Class Class source
  Plain text file tableexprTest.php Class Class source
  Plain text file updateTest.php Class Class source
  Plain text file whereTest.php Class Class source

  Files folder image Files (575)  /  tests  /  cases  /  parser  
File Role Description
  Plain text file aliasesTest.php Class Class source
  Plain text file allcolumnsTest.php Class Class source
  Plain text file backtickTest.php Class Class source
  Plain text file customfunctionTest.php Class Class source
  Plain text file deleteTest.php Class Class source
  Plain text file dropTest.php Class Class source
  Plain text file fromTest.php Class Class source
  Plain text file gtltopTest.php Class Class source
  Plain text file inlistTest.php Class Class source
  Plain text file insertTest.php Class Class source
  Plain text file issue102Test.php Class Class source
  Plain text file issue107Test.php Class Class source
  Plain text file issue108Test.php Class Class source
  Plain text file issue117Test.php Class Class source
  Plain text file issue11Test.php Class Class source
  Plain text file issue120Test.php Class Class source
  Plain text file issue122Test.php Class Class source
  Plain text file issue125Test.php Class Class source
  Plain text file issue12Test.php Class Class source
  Plain text file issue131Test.php Class Class source
  Plain text file issue133Test.php Class Class source
  Plain text file issue135Test.php Class Class source
  Plain text file issue136Test.php Class Class source
  Plain text file issue137Test.php Class Class source
  Plain text file issue138Test.php Class Class source
  Plain text file issue139Test.php Class Class source
  Plain text file issue148Test.php Class Class source
  Plain text file issue149Test.php Class Class source
  Plain text file issue150Test.php Class Class source
  Plain text file issue15Test.php Class Class source
  Plain text file issue21Test.php Class Class source
  Plain text file issue25Test.php Class Class source
  Plain text file issue30Test.php Class Class source
  Plain text file issue31Test.php Class Class source
  Plain text file issue32Test.php Class Class source
  Plain text file issue33Test.php Class Class source
  Plain text file issue34Test.php Class Class source
  Plain text file issue36Test.php Class Class source
  Plain text file issue37Test.php Class Class source
  Plain text file issue38Test.php Class Class source
  Plain text file issue39Test.php Class Class source
  Plain text file issue40Test.php Class Class source
  Plain text file issue41Test.php Class Class source
  Plain text file issue42Test.php Class Class source
  Plain text file issue43Test.php Class Class source
  Plain text file issue44Test.php Class Class source
  Plain text file issue45Test.php Class Class source
  Plain text file issue46Test.php Class Class source
  Plain text file issue50Test.php Class Class source
  Plain text file issue51Test.php Class Class source
  Plain text file issue52Test.php Class Class source
  Plain text file issue53Test.php Class Class source
  Plain text file issue54Test.php Class Class source
  Plain text file issue55Test.php Class Class source
  Plain text file issue56Test.php Class Class source
  Plain text file issue60Test.php Class Class source
  Plain text file issue61Test.php Class Class source
  Plain text file issue62Test.php Class Class source
  Plain text file issue65Test.php Class Class source
  Plain text file issue67Test.php Class Class source
  Plain text file issue68Test.php Class Class source
  Plain text file issue69Test.php Class Class source
  Plain text file issue70Test.php Class Class source
  Plain text file issue71Test.php Class Class source
  Plain text file issue72Test.php Class Class source
  Plain text file issue74Test.php Class Class source
  Plain text file issue78Test.php Class Class source
  Plain text file issue79Test.php Class Class source
  Plain text file issue80Test.php Class Class source
  Plain text file issue82Test.php Class Class source
  Plain text file issue84Test.php Class Class source
  Plain text file issue87Test.php Class Class source
  Plain text file issue90Test.php Class Class source
  Plain text file issue91Test.php Class Class source
  Plain text file issue93Test.php Class Class source
  Plain text file issue94Test.php Class Class source
  Plain text file issue95Test.php Class Class source
  Plain text file issue97Test.php Class Class source
  Plain text file issue98Test.php Class Class source
  Plain text file issue_git11Test.php Class Class source
  Plain text file leftTest.php Class Class source
  Plain text file manualTest.php Class Class source
  Plain text file nestedTest.php Class Class source
  Plain text file positionsTest.php Class Class source
  Plain text file selectTest.php Class Class source
  Plain text file showTest.php Class Class source
  Plain text file subselectTest.php Class Class source
  Plain text file tableoptionsTest.php Class Class source
  Plain text file unionTest.php Class Class source
  Plain text file updateTest.php Class Class source
  Plain text file variablesTest.php Class Class source
  Plain text file zeroTest.php Class Class source

  Files folder image Files (575)  /  tests  /  expected  
File Role Description
Files folder imagecreator (95 files)
Files folder imageparser (148 files)

  Files folder image Files (575)  /  tests  /  expected  /  creator  
File Role Description
  Accessible without login Plain text file asc.sql Data Auxiliary data
  Accessible without login Plain text file delete.sql Data Auxiliary data
  Accessible without login Plain text file distinct.sql Data Auxiliary data
  Accessible without login Plain text file function.sql Data Auxiliary data
  Accessible without login Plain text file inlist.sql Data Auxiliary data
  Accessible without login Plain text file insert1.sql Data Auxiliary data
  Accessible without login Plain text file insert2.sql Data Auxiliary data
  Accessible without login Plain text file insert3.sql Data Auxiliary data
  Accessible without login Plain text file issue100.sql Data Auxiliary data
  Accessible without login Plain text file issue101.sql Data Auxiliary data
  Accessible without login Plain text file issue102.sql Data Auxiliary data
  Accessible without login Plain text file issue104.sql Data Auxiliary data
  Accessible without login Plain text file issue105.sql Data Auxiliary data
  Accessible without login Plain text file issue106.sql Data Auxiliary data
  Accessible without login Plain text file issue110.sql Data Auxiliary data
  Accessible without login Plain text file issue112.sql Data Auxiliary data
  Accessible without login Plain text file issue117.sql Data Auxiliary data
  Accessible without login Plain text file issue118.sql Data Auxiliary data
  Accessible without login Plain text file issue121.sql Data Auxiliary data
  Accessible without login Plain text file issue123.sql Data Auxiliary data
  Accessible without login Plain text file issue124.sql Data Auxiliary data
  Accessible without login Plain text file issue126.sql Data Auxiliary data
  Accessible without login Plain text file issue127.sql Data Auxiliary data
  Accessible without login Plain text file issue129.sql Data Auxiliary data
  Accessible without login Plain text file issue130.sql Data Auxiliary data
  Accessible without login Plain text file issue131.sql Data Auxiliary data
  Accessible without login Plain text file issue132.sql Data Auxiliary data
  Accessible without login Plain text file issue134.sql Data Auxiliary data
  Accessible without login Plain text file issue141.sql Data Auxiliary data
  Accessible without login Plain text file issue144.sql Data Auxiliary data
  Accessible without login Plain text file issue147.sql Data Auxiliary data
  Accessible without login Plain text file issue33a.sql Data Auxiliary data
  Accessible without login Plain text file issue33b.sql Data Auxiliary data
  Accessible without login Plain text file issue33c.sql Data Auxiliary data
  Accessible without login Plain text file issue33d.sql Data Auxiliary data
  Accessible without login Plain text file issue33e.sql Data Auxiliary data
  Accessible without login Plain text file issue33f.sql Data Auxiliary data
  Accessible without login Plain text file issue33g.sql Data Auxiliary data
  Accessible without login Plain text file issue33h.sql Data Auxiliary data
  Accessible without login Plain text file issue33i.sql Data Auxiliary data
  Accessible without login Plain text file issue33j.sql Data Auxiliary data
  Accessible without login Plain text file issue33k.sql Data Auxiliary data
  Accessible without login Plain text file issue33l.sql Data Auxiliary data
  Accessible without login Plain text file issue33m.sql Data Auxiliary data
  Accessible without login Plain text file issue57.sql Data Auxiliary data
  Accessible without login Plain text file issue58.sql Data Auxiliary data
  Accessible without login Plain text file issue62a.sql Data Auxiliary data
  Accessible without login Plain text file issue62b.sql Data Auxiliary data
  Accessible without login Plain text file issue62c.sql Data Auxiliary data
  Accessible without login Plain text file issue62d.sql Data Auxiliary data
  Accessible without login Plain text file issue62e.sql Data Auxiliary data
  Accessible without login Plain text file issue62f.sql Data Auxiliary data
  Accessible without login Plain text file issue62g.sql Data Auxiliary data
  Accessible without login Plain text file issue62h.sql Data Auxiliary data
  Accessible without login Plain text file issue62i.sql Data Auxiliary data
  Accessible without login Plain text file issue62j.sql Data Auxiliary data
  Accessible without login Plain text file issue62k.sql Data Auxiliary data
  Accessible without login Plain text file issue62l.sql Data Auxiliary data
  Accessible without login Plain text file issue62m.sql Data Auxiliary data
  Accessible without login Plain text file issue62n.sql Data Auxiliary data
  Accessible without login Plain text file issue62o.sql Data Auxiliary data
  Accessible without login Plain text file issue62p.sql Data Auxiliary data
  Accessible without login Plain text file issue62q.sql Data Auxiliary data
  Accessible without login Plain text file issue62r.sql Data Auxiliary data
  Accessible without login Plain text file issue63a.sql Data Auxiliary data
  Accessible without login Plain text file issue63b.sql Data Auxiliary data
  Accessible without login Plain text file issue63c.sql Data Auxiliary data
  Accessible without login Plain text file issue66.sql Data Auxiliary data
  Accessible without login Plain text file issue76a.sql Data Auxiliary data
  Accessible without login Plain text file issue76b.sql Data Auxiliary data
  Accessible without login Plain text file issue78a.sql Data Auxiliary data
  Accessible without login Plain text file issue78b.sql Data Auxiliary data
  Accessible without login Plain text file issue78c.sql Data Auxiliary data
  Accessible without login Plain text file issue78d.sql Data Auxiliary data
  Accessible without login Plain text file issue78e.sql Data Auxiliary data
  Accessible without login Plain text file issue79a.sql Data Auxiliary data
  Accessible without login Plain text file issue81.sql Data Auxiliary data
  Accessible without login Plain text file issue83a.sql Data Auxiliary data
  Accessible without login Plain text file issue83b.sql Data Auxiliary data
  Accessible without login Plain text file issue83c.sql Data Auxiliary data
  Accessible without login Plain text file issue85.sql Data Auxiliary data
  Accessible without login Plain text file issue86.sql Data Auxiliary data
  Accessible without login Plain text file issue87.sql Data Auxiliary data
  Accessible without login Plain text file issue88.sql Data Auxiliary data
  Accessible without login Plain text file issue89.sql Data Auxiliary data
  Accessible without login Plain text file issue92.sql Data Auxiliary data
  Accessible without login Plain text file issue94.sql Data Auxiliary data
  Accessible without login Plain text file issue98.sql Data Auxiliary data
  Accessible without login Plain text file issue_git10.sql Data Auxiliary data
  Accessible without login Plain text file join.sql Data Auxiliary data
  Accessible without login Plain text file left.sql Data Auxiliary data
  Accessible without login Plain text file magnus.sql Data Auxiliary data
  Accessible without login Plain text file tableexpr.sql Data Auxiliary data
  Accessible without login Plain text file update.sql Data Auxiliary data
  Accessible without login Plain text file where.sql Data Auxiliary data

  Files folder image Files (575)  /  tests  /  expected  /  parser  
File Role Description
  Accessible without login Plain text file alias1.serialized Data Auxiliary data
  Accessible without login Plain text file alias2.serialized Data Auxiliary data
  Accessible without login Plain text file alias3.serialized Data Auxiliary data
  Accessible without login Plain text file alias4.serialized Data Auxiliary data
  Accessible without login Plain text file allcolumns1.serialized Data Auxiliary data
  Accessible without login Plain text file allcolumns2.serialized Data Auxiliary data
  Accessible without login Plain text file allcolumns3.serialized Data Auxiliary data
  Accessible without login Plain text file allcolumns4.serialized Data Auxiliary data
  Accessible without login Plain text file allcolumns5.serialized Data Auxiliary data
  Accessible without login Plain text file backtick1.serialized Data Auxiliary data
  Accessible without login Plain text file delete1.serialized Data Auxiliary data
  Accessible without login Plain text file delete2.serialized Data Auxiliary data
  Accessible without login Plain text file delete3.serialized Data Auxiliary data
  Accessible without login Plain text file drop.serialized Data Auxiliary data
  Accessible without login Plain text file gtltop.serialized Data Auxiliary data
  Accessible without login Plain text file inlist1.serialized Data Auxiliary data
  Accessible without login Plain text file insert1.serialized Data Auxiliary data
  Accessible without login Plain text file insert2.serialized Data Auxiliary data
  Accessible without login Plain text file insert3.serialized Data Auxiliary data
  Accessible without login Plain text file issue102.serialized Data Auxiliary data
  Accessible without login Plain text file issue11.serialized Data Auxiliary data
  Accessible without login Plain text file issue117.serialized Data Auxiliary data
  Accessible without login Plain text file issue12.serialized Data Auxiliary data
  Accessible without login Plain text file issue120.serialized Data Auxiliary data
  Accessible without login Plain text file issue122.serialized Data Auxiliary data
  Accessible without login Plain text file issue125.serialized Data Auxiliary data
  Accessible without login Plain text file issue131.serialized Data Auxiliary data
  Accessible without login Plain text file issue133a.serialized Data Auxiliary data
  Accessible without login Plain text file issue133b.serialized Data Auxiliary data
  Accessible without login Plain text file issue135.serialized Data Auxiliary data
  Accessible without login Plain text file issue136a.serialized Data Auxiliary data
  Accessible without login Plain text file issue136b.serialized Data Auxiliary data
  Accessible without login Plain text file issue137.serialized Data Auxiliary data
  Accessible without login Plain text file issue138.serialized Data Auxiliary data
  Accessible without login Plain text file issue139.serialized Data Auxiliary data
  Accessible without login Plain text file issue148.serialized Data Auxiliary data
  Accessible without login Plain text file issue149.serialized Data Auxiliary data
  Accessible without login Plain text file issue15.serialized Data Auxiliary data
  Accessible without login Plain text file issue21.serialized Data Auxiliary data
  Accessible without login Plain text file issue25.serialized Data Auxiliary data
  Accessible without login Plain text file issue30.serialized Data Auxiliary data
  Accessible without login Plain text file issue31.serialized Data Auxiliary data
  Accessible without login Plain text file issue32.serialized Data Auxiliary data
  Accessible without login Plain text file issue33a.serialized Data Auxiliary data
  Accessible without login Plain text file issue33b.serialized Data Auxiliary data
  Accessible without login Plain text file issue33c.serialized Data Auxiliary data
  Accessible without login Plain text file issue33d.serialized Data Auxiliary data
  Accessible without login Plain text file issue33e.serialized Data Auxiliary data
  Accessible without login Plain text file issue33f.serialized Data Auxiliary data
  Accessible without login Plain text file issue33g.serialized Data Auxiliary data
  Accessible without login Plain text file issue33h.serialized Data Auxiliary data
  Accessible without login Plain text file issue33i.serialized Data Auxiliary data
  Accessible without login Plain text file issue33j.serialized Data Auxiliary data
  Accessible without login Plain text file issue33k.serialized Data Auxiliary data
  Accessible without login Plain text file issue33l.serialized Data Auxiliary data
  Accessible without login Plain text file issue33m.serialized Data Auxiliary data
  Accessible without login Plain text file issue33n.serialized Data Auxiliary data
  Accessible without login Plain text file issue33o.serialized Data Auxiliary data
  Accessible without login Plain text file issue33p.serialized Data Auxiliary data
  Accessible without login Plain text file issue33q.serialized Data Auxiliary data
  Accessible without login Plain text file issue33r.serialized Data Auxiliary data
  Accessible without login Plain text file issue33s.serialized Data Auxiliary data
  Accessible without login Plain text file issue33t.serialized Data Auxiliary data
  Accessible without login Plain text file issue34a.serialized Data Auxiliary data
  Accessible without login Plain text file issue34b.serialized Data Auxiliary data
  Accessible without login Plain text file issue36a.serialized Data Auxiliary data
  Accessible without login Plain text file issue36b.serialized Data Auxiliary data
  Accessible without login Plain text file issue36c.serialized Data Auxiliary data
  Accessible without login Plain text file issue37.serialized Data Auxiliary data
  Accessible without login Plain text file issue38.serialized Data Auxiliary data
  Accessible without login Plain text file issue39.serialized Data Auxiliary data
  Accessible without login Plain text file issue40a.serialized Data Auxiliary data
  Accessible without login Plain text file issue40b.serialized Data Auxiliary data
  Accessible without login Plain text file issue41.serialized Data Auxiliary data
  Accessible without login Plain text file issue42.serialized Data Auxiliary data
  Accessible without login Plain text file issue43.serialized Data Auxiliary data
  Accessible without login Plain text file issue44.serialized Data Auxiliary data
  Accessible without login Plain text file issue45.serialized Data Auxiliary data
  Accessible without login Plain text file issue51.serialized Data Auxiliary data
  Accessible without login Plain text file issue52.serialized Data Auxiliary data
  Accessible without login Plain text file issue53a.serialized Data Auxiliary data
  Accessible without login Plain text file issue53b.serialized Data Auxiliary data
  Accessible without login Plain text file issue54.serialized Data Auxiliary data
  Accessible without login Plain text file issue55a.serialized Data Auxiliary data
  Accessible without login Plain text file issue55b.serialized Data Auxiliary data
  Accessible without login Plain text file issue61.serialized Data Auxiliary data
  Accessible without login Plain text file issue62a.serialized Data Auxiliary data
  Accessible without login Plain text file issue62b.serialized Data Auxiliary data
  Accessible without login Plain text file issue62c.serialized Data Auxiliary data
  Accessible without login Plain text file issue65.serialized Data Auxiliary data
  Accessible without login Plain text file issue67a.serialized Data Auxiliary data
  Accessible without login Plain text file issue67b.serialized Data Auxiliary data
  Accessible without login Plain text file issue68.serialized Data Auxiliary data
  Accessible without login Plain text file issue69.serialized Data Auxiliary data
  Accessible without login Plain text file issue70.serialized Data Auxiliary data
  Accessible without login Plain text file issue71a.serialized Data Auxiliary data
  Accessible without login Plain text file issue71b.serialized Data Auxiliary data
  Accessible without login Plain text file issue72.serialized Data Auxiliary data
  Accessible without login Plain text file issue74a.serialized Data Auxiliary data
  Accessible without login Plain text file issue74b.serialized Data Auxiliary data
  Accessible without login Plain text file issue74c.serialized Data Auxiliary data
  Accessible without login Plain text file issue74d.serialized Data Auxiliary data
  Accessible without login Plain text file issue74e.serialized Data Auxiliary data
  Accessible without login Plain text file issue74f.serialized Data Auxiliary data
  Accessible without login Plain text file issue78a.serialized Data Auxiliary data
  Accessible without login Plain text file issue78b.serialized Data Auxiliary data
  Accessible without login Plain text file issue78c.serialized Data Auxiliary data
  Accessible without login Plain text file issue78d.serialized Data Auxiliary data
  Accessible without login Plain text file issue78e.serialized Data Auxiliary data
  Accessible without login Plain text file issue79a.serialized Data Auxiliary data
  Accessible without login Plain text file issue79b.serialized Data Auxiliary data
  Accessible without login Plain text file issue80a.serialized Data Auxiliary data
  Accessible without login Plain text file issue80b.serialized Data Auxiliary data
  Accessible without login Plain text file issue82.serialized Data Auxiliary data
  Accessible without login Plain text file issue84a.serialized Data Auxiliary data
  Accessible without login Plain text file issue84b.serialized Data Auxiliary data
  Accessible without login Plain text file issue84c.serialized Data Auxiliary data
  Accessible without login Plain text file issue87a.serialized Data Auxiliary data
  Accessible without login Plain text file issue87b.serialized Data Auxiliary data
  Accessible without login Plain text file issue90.serialized Data Auxiliary data
  Accessible without login Plain text file issue91.serialized Data Auxiliary data
  Accessible without login Plain text file issue93.serialized Data Auxiliary data
  Accessible without login Plain text file issue94.serialized Data Auxiliary data
  Accessible without login Plain text file issue97.serialized Data Auxiliary data
  Accessible without login Plain text file issue98.serialized Data Auxiliary data
  Accessible without login Plain text file issue_git11.serialized Data Auxiliary data
  Accessible without login Plain text file left1.serialized Data Auxiliary data
  Accessible without login Plain text file left2.serialized Data Auxiliary data
  Accessible without login Plain text file manual.serialized Data Auxiliary data
  Accessible without login Plain text file nested1.serialized Data Auxiliary data
  Accessible without login Plain text file nested2.serialized Data Auxiliary data
  Accessible without login Plain text file positions1.serialized Data Auxiliary data
  Accessible without login Plain text file select1.serialized Data Auxiliary data
  Accessible without login Plain text file select2.serialized Data Auxiliary data
  Accessible without login Plain text file show1.serialized Data Auxiliary data
  Accessible without login Plain text file show2.serialized Data Auxiliary data
  Accessible without login Plain text file show3.serialized Data Auxiliary data
  Accessible without login Plain text file show4.serialized Data Auxiliary data
  Accessible without login Plain text file show5.serialized Data Auxiliary data
  Accessible without login Plain text file subselect1.serialized Data Auxiliary data
  Accessible without login Plain text file subselect2.serialized Data Auxiliary data
  Accessible without login Plain text file tableoptions1.serialized Data Auxiliary data
  Accessible without login Plain text file union1.serialized Data Auxiliary data
  Accessible without login Plain text file union2.serialized Data Auxiliary data
  Accessible without login Plain text file update1.serialized Data Auxiliary data
  Accessible without login Plain text file update2.serialized Data Auxiliary data
  Accessible without login Plain text file variables1.serialized Data Auxiliary data
  Accessible without login Plain text file variables2.serialized Data Auxiliary data

  Files folder image Files (575)  /  vendor  
File Role Description
  Accessible without login Plain text file readme.txt Doc. Documentation

  Files folder image Files (575)  /  wiki  
File Role Description
  Accessible without login Plain text file Complex-Example.md Data Auxiliary data
  Accessible without login Plain text file Downloads.md Data Auxiliary data
  Accessible without login Plain text file Parser-Manual.md Example Example script
  Accessible without login Plain text file Roadmap.md Data Auxiliary data
  Accessible without login Plain text file User-Response.md Data Auxiliary data

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:123
This week:0
All time:9,468
This week:41Up