|
Posted by None on 08/02/05 03:51
Hello,
I know these seem simple to most but...
I created a simple connection class:
Class connDb{
public $resourse;
function Conn($host,$user,$pass){
$link = mysql_connect($host, $user, $pass);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
$this->resourse=$link;
mysql_select_db("test2");
When I go to create 2 objects with the same name:
$connTest = new connDb;
$connTest->Conn('localhost','root', '');
echo $connTest->resourse;
$connTest = new connDb;
$connTest->Conn('localhost','mike', '');
echo $connTest->resourse;
I DO NOT get an error I just get 2 different resourcce IDs.Can you have two
objects with the same name?
Thanks
Mike
Navigation:
[Reply to this message]
|