[nycphp-talk] Pear DB in another class
Russ Demarest
rsd at electronink.com
Tue Mar 21 13:38:01 EST 2006
Is it possible to use Pear DB in a class that returns a database
handle that I can then run queries with.
I think it should look something like this
== myDb.php ==
require_once 'DB.php';
class myDb extends DB {
function myDb(){
$dsn = "mysqli://user:pass@localhost/db";
$db = DB::connect();
}
}
===EOF===
I can do an include that generates a handle but thought there would
be a way to write a class that could grab the config info and connect().
Thanks,
Russ
More information about the talk
mailing list