Hi all
I'm learning OOP and I'm having a bit of trouble grasping the concepts. I'm trying to code a class that will connect to a database and have a function that will insert data into a table no matter how complex the insert is. For instance:
Insert 1:
INSERT INTO animals (animal type, size, age) VALUES ($animal_type, $size, $age)
Insert 2:
INSERT INTO food (type, calories) VALUES ($type, $calories)
Basically I'm not sure how to create a function to do this or if I should make an abstract class or create an interface.
P.S. I have more than one table each with differing amounts of columns.