MySQL db class written in PHP