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 o
riginal Message-
From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, August
22, 2006 7:27 PM
To: Peter Lauri
Cc: php-general@lists.php.net
Subject: Re: [PHP] Overriding core functions
Peter Lauri wrote:
Hi,
I want to add some functionality when calling the mysql_query():
Brad Bonkoski wrote:
Some already good workarounds given for this question...
BUT.
Is it even possible to override a core function?
Like I wrote a function called 'exit' and I got a parser error, which
leads me to believe it is not even possible to override the core
functions. Is this true of
On Tue, 2006-08-22 at 22:19 +0700, Peter Lauri wrote:
> 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.
You could look into the runkit extension. I believe it allows this. At
any rate, using mysql_xxx() is veyr low level and
that, but with core functions :)
-Original Message-
From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, August
22, 2006 7:27 PM
To: Peter Lauri
Cc: php-general@lists.php.net
Subject: Re: [PHP] Overriding core functions
Peter Lauri wrote:
Hi,
I want to add some functional
em Maas [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 22, 2006 7:27 PM
To: Peter Lauri
Cc: php-general@lists.php.net
Subject: Re: [PHP] Overriding core functions
Peter Lauri wrote:
Hi,
I want to add some functionality when calling the mysql_query():
function my_query($Query) {
7:27 PM
To: Peter Lauri
Cc: php-general@lists.php.net
Subject: Re: [PHP] Overriding core functions
Peter Lauri wrote:
> Hi,
>
>
>
> I want to add some functionality when calling the mysql_query():
>
>
>
function my_query($Query) {
//do stuff before
] 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_qu
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 a
Peter Lauri wrote:
> Hi,
>
>
>
> I want to add some functionality when calling the mysql_query():
>
>
>
function my_query($Query) {
//do stuff before
mysql_query($Query);
//do things after
}
// or something like:
class PeteDB {
var $conn;
10 matches
Mail list logo