Hi,
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
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;
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
] 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
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
mysql_query($Query
:[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) {
//do
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 functionality when calling
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
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
: 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():
function my_query($Query
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
11 matches
Mail list logo