Raj Shekhar wrote:
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
Yes, but as this is a migration project (as indicated by the OP), that
would require you going through and running every possible branch of the
application code to get MySQL to execute the queries and therefore log them.
Logging queries that are run is a different thing than pulling all of
the SQL queries out of given PHP files.
--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/
If you find my advice useful, please consider donating to a poor
student! You can choose whatever amount you think my advice was
worth to you. http://tinyurl.com/7oa5s
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php