Re: SQL_Parser

From: Date: Fri, 19 Dec 2003 16:13:35 +0000
Subject: Re: SQL_Parser
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24542@lists.php.net to get a copy of this message
Norbert Mocsnik wrote:
Cool idea but I'd prefer another package name, SQL_Formatter, SQL_Highlighter or whatever fits the standards. Parsing is much more than this.
+1, its not anything i would expect in sql_parser
About this package SQL, i was think a fucntion that would help me as i made a class for debug infos. This function would take a query in param : function formatQueryString($Sql, $FormatMode) {
    ..
} Depending the FormatMode, the query would be returned as formated test with indentation : // Silly example formatQueryString("select * from User Where nUserID in ( Select nUserID from user where nUserID = 12 )"); The returned string would be : SELECT * FROM User WHERE nUserID IN
    ( SELECT nUserID
      FROM User WHERE nUserID = 12 )
We can imagine different modes, with html table, bold style for SQL keyword and so on... It sould be usefull, what do you think about it ?
-- Wolfram http://opensource.visionp.de ... authentication system .... http://sf.net/projects/auth

« previous php.pear.dev (#24542) next »