
I like to use a pagination class I wrote for lots of projects, it takes a sql query, and some configuration options, and puts together a flexy compatible paged data grid, and can serve CSV and XML Excel dumps of the data. It's handy as hell and makes my life simple. Someday I'd like to merge it and an ajax enabled version into one class and release it but for now I am just writing about the sql tokenizer component.
I couldn't find a sql tokenizer for php, or a parser of any kind. If there's one out there that I didn't see hopefully someone will let me know.
Updated 12/29/2008 - Found a complex query that didn't play nice, so I tweaked the code.
Updated 01/16/2009 - Found a bug, fixed it.
Updated 01/27/2009 - Changed from GPL to LGPL
Updated 02/25/2009 - Parse error, fixed it.
Updated 10/29/2009 - Inline comments fix.
It seems that safe_mode will continue to make some things downright painful.
I'm working up a test script to explain this better and test the environments I am forced to work with.
Here are some more similar yet different details:
http://forums.devshed.com/php-development-5/mkdir-possible-under-safe-mode-78005.html
http://bugs.php.net/bug.php?id=33639
Related? http://www.titov.net/safemodepatch/
It may be that all I need is for safe_mode_gid to be enabled in the php.ini
I don't have access to the environment in question to see if it's already on/off or if the admin will even enable it. This is all fallout from PCI Compliance requirements.