I have my own db class which has some purpose built functions that I am using.
I would like to also include all the standard mysql functions within that class so I can use encapsulation effectively. Rather than process data in an object and then process it using some external functions to that class object.
I would like all the common functions e.g.
mysql_num_rows(), mysql_fetch_object(), mysql_fetch_assoc()
So the result would be:
e.g.
$rows = $db->mysql_num_rows($result);
Instead of doing
$rows = mysql_num_rows($result);
I am assuming the standard mysql functions belong to a class in PHP somewhere. However I could not find documentation about that.
So it would be awesome if you could point me in the right direction for doing this
Actually, the “standard” MySQL functions you are referring to are to be deprecated in a future PHP release (Taken from http://www.php.net/manual/en/mysqlinfo.api.choosing.php, emphasis mine):
Even the mysqli_* functions are just that – functions – that are part of the PHP core but do not belong to any class. If you are looking to take an object-oriented approach, PDO_MySQL is the way to go.