zypher11;10954283 wrote:Primarily because PDO allows you to insert prepared statements in an array.
Not sure what you mean. Got a code sample?
zypher11;10954283 wrote:The only problem is that after researching the stability of PDO ive seen some blogs harping on how it was the biggest mistake in php. Does anyone have any first hand knowledge on PDO indicating any possible security risks or faults in the programming?
I still haven't really gotten very deep into DB abstraction. Having read this rant, I'm starting to think it's probably important to examine your reasons for wanting a db abstraction layer. I'm not entirely convinced they are always necessary because although there is such a thing as standardized SQL, the various DBMS' all support slightly different language features and you may find yourself having to change all your SQL unless you are VERY VERY careful when building your SQL statements.
I have not used PDO nor read much about it so I can't comment on security risks.
I have been thinking it would be nice to write a PHP script that could build a DataObject class for an arbitrary table based on the output of an EXPLAIN statement. One could then create a DataMapper class to manipulate any of these auto-generated DataObject classes to do all the crud you need as well as some validation. Writing this sort of thing for any arbitrary DBMS sounds hard, but writing it once for MySQL sounds very do-able.