calling classes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a class which extends to include a mysql class.

Within the class's functions i have multiple calls (without creating an
object like '$instance = new MysqlDb()'  ) to the  mysql class like this:

function doThis(){

$this->query("....");
$this->selectquery();

do something else here....

$this->query("....");
$this->selectquery();

}

My question is whether I should beware of two instances of the mysql object
getting mixed up somehow. I feel I should clear each instance after use,
like I would nullify a variable with $var="";

My scripts seem to run fine, but i wonder if the above is bad practice...




Malc

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux