Hello guys,
I want to build my own Database Class with PDO. This Class should extend the PDO Methods. I heard that i should create an abstraction layer and two different Classes, is that right? First Class should do the connection and the second class has the new methods.
My Database Class should have the following methods
- select
- insert
- update
Access like:
$db->select ($table, $data) { }
$db->insert($table, $data) { }
$db->update($table, $data) { }
I dont know, how i should begin... i know how i can create a PDO Connection, but i haven't a idea how i can do a abstraction layer with PDO...
please help me:(
I heard that i should use a abstraction layer. One Class for the connection and one class for the methods.