• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16. PHP > Database Functions

16.15. Database Functions

PHP supports a number of databases directly through the databases' own native APIs. Each of the databases is covered in a separate section. Many of the databases can also be accessed through ODBC if appropriate ODBC drivers are available for that particular database. Adabas-D, Solid, Empress, and Velocis have native APIs that are so similar to the ODBC API that having a separate set of functions for each one was redundant. So, for these three databases, use the ODBC set of functions. It is important to understand, however, that for those four databases, the actual communication is direct and native and does not go through any sort of intermediary ODBC layer.

16.15.1. dBase Functions

PHP allows you to access records stored in dBase-format (dbf) databases. dBase files are simple sequential files of fixed length records. Records are appended to the end of the file and delete records are kept until you call dbase_pack(). Unlike with SQL databases, once a dBase file is created, the database definition is fixed. There are no indexes that speed searching or otherwise organize your data. Because of these limitations, we don't recommend using dBase files as your production database. Choose a real SQL server, such as MySQL or Postgres, instead. PHP provides dBase support to allow you to import and export data to and from your web database, as the format is understood by Windows spreadsheets and organizers. In other words, the import and export of data is about all that dBase support is good for.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint