2 ms·
On a database section, I am not a fan of PDO and I choose native interfaces like mysqli for my DAO layer or opt for something high level like ORM depending on t
by grakic 14y ago
On a database section, I am not a fan of PDO and I choose native interfaces like mysqli for my DAO layer or opt for something high level like ORM depending on the requirements.
But it goes without saying that protection from SQL injection is a must, it is just PDO's statement binding is not the only way. MySQLi does support data binding, and for others it is easy to DIY using sprintf and whatever is the escaping method target native driver implements.
- astrodust 14y agoDIY and SQL are not two things you want to see together.
- swivelmaster 14y agoYou can use PDO to connect and run queries without using all the crazy variable binding features.