문제

I'm currently using the ezsql library. Now I want to learn another method of interacting to a mysql database using php. What extension should I use if I'm connecting to a database which is used for different transactions. Should I use pdo or mysqli or some other extension that you can recommend?

도움이 되었습니까?

해결책

mysqli and PDO both support transactions directly, and the old mysql_* functions can manually trigger a transaction by sending a "BEGIN TRANSACTION" query, and "COMMIT" or "ROLLBACK" queries when you're done.

I'd personally go for PDO, but that's just personal preference. Mysqli should be fine also.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top