简体   繁体   中英

Library to Connect to Mssql 2008 Express Edition with PHP

Which is better to use?

  • mssql_connect
  • odbc_connect
  • or PDO for odbc?

You should use PDO, and make a habit out of it.

Why?

PDO is a modern and very mature interface which actually makes it fun and easy to make prepared statements. Another reason is, as stated on their manual :

PDO provides a data-access abstraction layer, which means that, regardless of which database you're using, you use the same functions to issue queries and fetch data. PDO does not provide a database abstraction; it doesn't rewrite SQL or emulate missing features. You should use a full-blown abstraction layer if you need that facility.

Did i say it was easy?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM