Advantages of using MDB2 over straight database functions like mysql_query?

198 Views Asked by At

What are the advantages (and disadvantages) of using the Object-Oriented database library MDB2 over the straight database functions that come with PHP?

1

There are 1 best solutions below

0
On

Being able to use PEAR functions like autoExecute, prepare and query. If you are working a lot with database then you get the advantage of having PEAR escape your data. It will also handle errors if the value is not the same type expected.

EXAMPLE: You can do multiple inserts, etc. with one statement and an array of values.