My attempt at making an useful PHP database class