View Single Post
Old 07-14-2008, 03:38 PM   #15 (permalink)
drewbee
The Acquainted
 
drewbee's Avatar
 
Join Date: May 2008
Posts: 175
Thanks: 9
drewbee is on a distinguished road
Default

Well, since this is a math class, I would actually have a seperate class for the database as well
PHP Code:
class Math
{
    public 
mysqli;
 
    public function 
__construct()
    {
          
$this->mysqli = new mysql('local','user','pass','db');
    }
}
 
$math = new Math;
$math->mysqli->query("SELECT...."); 
__________________
There are No Stupid Questions. But there a LOT of Inquisitive Idiots.
Send a message via AIM to drewbee
drewbee is offline  
Reply With Quote
The Following User Says Thank You to drewbee For This Useful Post:
CMellor (07-14-2008)