RE: [PHP] Re: [new version] Re: [a proactive example of learning by hacking] Re: [PHP] Getting queries from files FYI

2005-08-26 Thread Jay Blanchard
[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

Re: [PHP] Re: [new version] Re: [a proactive example of learning by hacking] Re: [PHP] Getting queries from files FYI

2005-08-26 Thread Jochem Maas
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

Re: [PHP] Re: [new version] Re: [a proactive example of learning by hacking] Re: [PHP] Getting queries from files FYI

2005-08-25 Thread Robin Vickery
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

[PHP] Re: [new version] Re: [a proactive example of learning by hacking] Re: [PHP] Getting queries from files FYI

2005-08-24 Thread Jochem Maas
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

[PHP] RE: [new version] Re: [a proactive example of learning by hacking] Re: [PHP] Getting queries from files FYI

2005-08-24 Thread Jay Blanchard
[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

[PHP] RE: [new version] Re: [a proactive example of learning by hacking] Re: [PHP] Getting queries from files FYI

2005-08-24 Thread Jay Blanchard
[snip] here is a new and improved version: http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php