SQL_Parser
| From: | Webmaster@STR | Date: | Fri, 19 Dec 2003 15:50:49 +0000 |
| Subject: | SQL_Parser | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-24538@lists.php.net to get a copy of this message | ||
> From: coil at strangebuzz dot com
> Operating system: 2K + Esay PHP 1.7
> PHP version: 4.3.4
> P Bug Type: SQL_Parser
> Bug description: Notice with function
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 ?