Jay Blanchard wrote:
[snip]
This is another rather hackish attempt at using the tokeniser.
Which isn't perfect by a long shot, but I'm away home now so it'll have
to do.
I'd be interested to know what it makes of your queries.
[/snip]
This little slice of code is really well done, and I think that when it
ditto - nice code Robin.
I have been on holiday for 2 weeks without a computer - shock,horror (what
kind of holiday is that anyway ;-) and have been out of the running
I will make an attempt shortly to integrate robins tokenizing code into
the 'tool' I hackd up on the basis of Jays code.... given that I'm a firebirder
and you (two) Are mysqler (at least as far as this little exercise is concerned)
I think it's well worth the effort to make it possible to 'switch' DB
extensions... (or maybe make it grab stuff from any extension...)
if I've missed some comms on this thread/topic could you repost me (without the
in the subject - cos it's a little tough to weed thru the 2500 unread
php mails in my inbox :-P
rgds,
Jochem
is combined with the code from the original so that the file names for
each query can be identified and the other items can be specified from
the command line as Jochem had done this will be one really popular
little application. I made one change Robin and have one suggestion
I changed line 4 from
//looks at all $dir/*.php files.
$dir = '/path/to/php/files';
//looks at all $dir/*.php files.
$dir = $_SERVER['PWD'];
Which means that you will not have to modifiy the line each time you
place it in a different directory. Other than that, using glob in this
function;
function getPhpFileList($dir)
{
if (!is_dir($dir)) $dir = '.';
return glob($dir . '/*.php');
}
Will not work in older versions of PHP. Some folks still have these
older versions running (for various reasons) and may need this changed.
What's possibly next for this little application? Perhaps a method to
determine which type of database is being used based on connection
we are of like minds regarding this :-)
information or what have you. Learning by hacking, isn't it cool?
si senor ;-)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php