RE: [PHP] Overriding core functions
| From: | Peter Lauri | Date: | Tue, 22 Aug 2006 15:19:21 +0000 |
| Subject: | RE: [PHP] Overriding core functions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-241004@lists.php.net to get a copy of this message | ||
Yes, of course I can do that. But I was just lazy and wanted to reuse the
function mysql_query that I am already using.
-----Original Message-----
From: Paul Scott [mailto:pscott@uwc.ac.za]
Sent: Tuesday, August 22, 2006 7:48 PM
To: Peter Lauri
Cc: php-general@lists.php.net
Subject: Re: [PHP] Overriding core functions
On Tue, 2006-08-22 at 18:39 +0700, Peter Lauri wrote:
> I want to add some functionality when calling the mysql_query():
Why not simply wrap the mysql_query function in a php function?
function query($whatever)
{
log($whatever);
$ret = mysql_query($whatever);
//do stuff after
return $ret;
}
--Paul