I have a PHP class called Vehicle that manages everything pertaining to cars,motorbikes and trucks. I have over a hundred private variables that is associated with every db field in each of the tables cars,bikes,trucks.
For example: A car has: -Fuel Consumption -Max horsepower -Max torque .. etc.. so i have data members
private $fuel;
private $horsepower;
private $toque;
When I do a database query to find a car by id, i store all the rows inside their corresponding variables.
The car table has about 50 fields, the bikes table has 30 fieldsand the trucks 30 fields. So there is over 110 data members.
Is there a better way to do that?