Re: Getting queries from files FYI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robin Vickery <robinv@xxxxxxxxx> writes:

> On 8/23/05, Jay Blanchard <jay.blanchard@xxxxxxxxxxxxxxxxxxxxx> 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
> > the making of this code);
> 
> Just a thought - and I know it's a little late, sorry.
> 
> Have you considered writing a wrapper for mysql_query() that logs its
> parameters?

(I cannot locate the original post, hence replying to this mail)

You can enable logging in mysql server itself to log all queries
http://dev.mysql.com/doc/mysql/en/binary-log.html ( there are ways to
restrict logging to only some databases) . Later when you want to replay
the sql statements, you can use mysqlbinlog 

-- 
Raj Shekhar
blog : http://rajshekhar.net/blog  home : http://rajshekhar.net
Disclaimer : http://rajshekhar.net/disclaimer

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux