[top-snip]
nice! I'll give it a look this morning
[/snip]
This is another rather hackish attempt at using the tokeniser.
It turns this:
into this:
SELECT * FROM my_table WHERE (up = 'down') ORDER BY my_column $banana
ASC strtoupper( group by something)
Which isn't perfect by a long shot, bu
Robin Vickery wrote:
This is another rather hackish attempt at using the tokeniser.
you beast ;-)
apart from the fact that I don't use mysql this is really cool.
I have no time to play right now (gotta catcha plana) but I have
it on my to do list of things I need to take apart and
understand p
This is another rather hackish attempt at using the tokeniser.
It turns this:
into this:
SELECT * FROM my_table WHERE (up = 'down') ORDER BY my_column $banana
ASC strtoupper( group by something)
Which isn't perfect by a long shot, but I'm away home now so it'll have to do.
I'd be interested
On 8/23/05, Jay Blanchard <[EMAIL PROTECTED]> wrote:
> You may (or may not) remember me posting to the list a couple of weeks
> ago asking about using REGEX to get queries out of PHP files for a
> migration project. I had to let it go for several days, but started
> working on it again yesterday, h
Jay Blanchard wrote:
[top-snip, because it makes sense in the context]
On line 98 I changed from
echo "Line " . str_pad($lineNo, 4, ' ', PAD_LEFT) . ": " .
$fileLine;
to
echo "Line " . str_pad($lineNo, 4, ' ', PAD_LEFT) . ": " .
ltrim($fileLine);
to account for indented code, lines ev
[top-snip, because it makes sense in the context]
On line 98 I changed from
echo "Line " . str_pad($lineNo, 4, ' ', PAD_LEFT) . ": " .
$fileLine;
to
echo "Line " . str_pad($lineNo, 4, ' ', PAD_LEFT) . ": " .
ltrim($fileLine);
to account for indented code, lines everything up neatly.
Al
[snip]
here is a new and improved version:
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
hi Jay,
here is a new and improved version:
*/
/* script help message */
if (in_array('--help', $_SERVER['argv']) ||
in_array('-h', $_SERVER['argv']) ||
in_array('-?', $_SERVER['argv']))
{
echo '
Use this command to search for SQL query strings inside php files.
call from command
On 8/23/05, Jochem Maas <[EMAIL PROTECTED]> wrote:
> Jay Blanchard wrote:
> >
> > Also, sweet move with the array_reverse...
> >
> > $fileParts = array_reverse(explode('.', $theFile));
> > if("php" == $fileParts[0]){
> >
> > ...it prevents problems with funky file names containing more
Jay Blanchard wrote:
You may (or may not) remember me posting to the list a couple of weeks
ago asking about using REGEX to get queries out of PHP files for a
migration project. I had to let it go for several days, but started
working on it again yesterday, here is the code (no REGEX was used in
[snip]
> argv[] is always available
[/snip]
As an example you could something like this...
$requestedDatabase = $argv[1];
so that [EMAIL PROTECTED]:/usr/myApp/whatever php chaFinder.php CHA >
output.txt
will have $requestedDatabase == 'CHA'
[snip]
btw if my file names are funky I am too?
[/sni
Jay Blanchard wrote:
[snip]
I figured as much - I was think of adding an optional param so that you
can optionally
add such an extra limit e,g:
cd /my/projects/stuff; php findqry.php --limit CHA > ./results.txt
[/snip]
argv[] is always available
indeed - I'll add something for that...
Also
[snip]
I figured as much - I was think of adding an optional param so that you
can optionally
add such an extra limit e,g:
cd /my/projects/stuff; php findqry.php --limit CHA > ./results.txt
[/snip]
argv[] is always available
Also, sweet move with the array_reverse...
$fileParts = array_reverse(
Jay Blanchard wrote:
[snip]
heh Jay, I have been playing with this ...
I rewrote your code abit (including removing the check for the string
'CHA'
- cos that was limiting my search too much ;-)
[/snip]
Cool, I'll have a look. I was using the 'CHA' because I was looking for
queries to the specifi
[snip]
heh Jay, I have been playing with this ...
I rewrote your code abit (including removing the check for the string
'CHA'
- cos that was limiting my search too much ;-)
[/snip]
Cool, I'll have a look. I was using the 'CHA' because I was looking for
queries to the specific database.
--
PHP Gen
Jay Blanchard wrote:
You may (or may not) remember me posting to the list a couple of weeks
I am a goldfish. hi my name is 10second Tom ;-)
ago asking about using REGEX to get queries out of PHP files for a
migration project. I had to let it go for several days, but started
working on it
16 matches
Mail list logo