There are some posts about this matter, but I didn\'t clearly get when to use object-oriented coding and when to use programmatic functions in an include. Somebody also ment
The OOPs concept is used in PHP, so as to secure the code. As all the queries are written in function file instead of code file so no one can easily hack our code. So it is better to use classes in PHP instead of directly writing the queries.