Login   Register  
PHP Classes
elePHPant
Icontem

SQL Parse Convert to Tree Array: Build a tree to represent an SQL query

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   Videos Videos   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (11)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2009-06-08 (5 years ago) RSS 2.0 feedStarStarStarStar 62%Total: 1,929 All time: 1,902 This week: 1,490Up
Version License PHP version Categories  
dqml2tree 0.12Public Domain4.4Databases, Text processing
Description Author  

This class can be used to build a tree to represent an SQL query.

It takes a given SQL query and parse it to extract the structure or queries and sub-queries. The resulting structure is returned as an array.

Currently it supports only SELECT, INSERT, UPDATE, DELETE queries.

Innovation Award  
PHP Programming Innovation award nominee
November 2008
Number 2
Sub-queries allow the execution of complex database queries that may be hard to read and understand.

This class can parse an SQL query with eventual nested sub-queries. It returns an array structure that is easier to read and understand.

Manuel Lemos
Picture of François NEUMANN-RYSTOW
Name: François NEUMANN-RYSTOW <contact>
Classes: 3 packages by
Country: France France
Age: 34
All time rank: 113338 in France France
Week rank: 1735 Down47 in France France Down
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

Videos  
  • php script sql query parser sql2tree
  Files folder image Files  
File Role Description
Accessible without login Plain text file dqml2tree.php Class Class File to include in your php script.
Accessible without login Plain text file example.php Example show how to use the class
Plain text file exploitation_example.php Example more precise examples !

 Version Control Unique User Downloads Download Rankings  
 0%Total:1,929All time:1,902
 This week:0This week:1,490Up
User Ratings User Comments (3)  
 All time
Utility:78%StarStarStarStar
Consistency:85%StarStarStarStarStar
Documentation:-
Examples:75%StarStarStarStar
Tests:-
Videos:70%StarStarStarStar
Overall:62%StarStarStarStar
Rank:700
 
This does not work.
2 years ago (Peter Mead)
22%StarStar
Great job.
4 years ago (Glauco)
75%StarStarStarStar
Bon script et bonne vision du web et de la pollution marketing .
4 years ago (comic)
80%StarStarStarStarStar