extending $db class
Submitted by rhellyer on Thu, 2006-06-22 05:58.
ezSQL
Is there a way for me to avoid having to add global $db to all of my little helper functions by making the helper functions extensions of $db in some way ?
eg. instead of
function deletelibrary ( $libid ) {
global $db;
$db->query("delete from library where id=$libid");
}
could I do something where I can just call
$db->deletelibrary( $libid );
?
