Home > Articles > Programming > PHP

  • Print
  • + Share This
This chapter is from the book

Q&A

  1. This hour is specific to MySQL. How transferable are these examples to other SQL databases?

  2. There are functions for mSQL that mirror those for MySQL almost exactly. Other database servers have corresponding PHP functions that support their features and capabilities. The common feature of many suites of database function is the capability to send SQL queries. If you work with ANSI (standard) SQL, you should have little problem adapting scripts across database servers.

  3. What is the best way of writing code that can be easily adapted to work with different database servers?

  4. It is often a good idea to group code that queries a database into a single class or library. If you need to rewrite your project to work with a different database, you will only need to change a discrete portion of your code without disturbing the project as a whole. Don't forget though that SQL varies from database application to database application.

  • + Share This
  • 🔖 Save To Your Account