in Symfony I saw you will find class for whole database tables, as well as for records too.

I my very own "framework" Im by using this, aside from records.

Im very pleased with just getting associative array together,

so $record = mysql_fetch_assoc(....);

I am not against it neither, I simply cant see its advantage - its fast to code.

Symfony use propel/doctrine since it's orm solution. Check the benefit of orm. It is a fact it's not so necessary in case your business logic really is easy.

There's a hugh distinction between raw PHP array data and objects. With raw data you are missing the entire spectrum of OO benefits... objects have techniques, you might have hierarchy and over-loading, you may also have class techniques, etc..

While using OO approach enables you to definitely separate the control logic in the DB layer, potentially permitting you to definitely swap the DB without altering the other logic. e.g. the save() approach to the information object could act on MySQL or PostgreSQL (or a number of other DBs), for the way your DB initialisation went. You only have to change one factor (the DB connector within the superclass) instead of 100s of DB-specific calls as with your code above, making this type of change simpler and fewer prone to break other things.

Also, if you wish to unit test out your functions (highly suggested), using dependency injection to pass through within an object representing a DB row, with pre-defined techniques e.g. save(), to_array(), can make it much simpler for your code to operate individually. After that you can test for if the passed in DB object implements the right interface (making certain that the techniques is going to be there) after which test the code using PHPUnit or SimpleTest.

Your decision if the extra effort is justified, however it helps you to save hassle in case your use cases change.