On Tue, August 22, 2006 6:39 am, Peter Lauri wrote:
>
> I want to add some functionality when calling the mysql_query():
>
> function mysql_query($Query) {
>
>             //do stuff before
>
>             mysql_query($Query);
>
>             //do things after
>
> }
>
>
>
> This would just be for one project where I want to record all Queries
> and
> the result of them, creating an own logging function.
>
> I did a lot of Google, but no article that I found that take care of
> this
> subject.

The only was I know of to over-ride core functions, or, in this case,
extension's functions, are to:
A) alter PHP source and re-compile
B) install the RunKit extension and be prepared for a wild ride

PHP simply doesn't have the infrastructure for you to override the
mysql_query() function as you want...

You'd have to use my_mysql_query() or somesuch, and then always call
that instead of the normal mysql_query.

You might be able to attack this from the MySQL side of things.

MySQL has a query logging facility which might be more amenable to
what you want to achieve.

-- 
Like Music?
http://l-i-e.com/artists.htm

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

Reply via email to