Re: SQL_Parser

From: Date: Fri, 19 Dec 2003 16:04:46 +0000
Subject: Re: SQL_Parser
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24540@lists.php.net to get a copy of this message
Cool idea but I'd prefer another package name, SQL_Formatter, SQL_Highlighter or whatever fits the standards. Parsing is much more than this.
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 ?


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