You are here: Re: Getting queries from files FYI « PHP « IT news, forums, messages
Re: Getting queries from files FYI

Posted by Raj Shekhar on 08/29/05 07:11

Robin Vickery <robinv@gmail.com> writes:

> On 8/23/05, Jay Blanchard <jay.blanchard@niicommunications.com> 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация