[ Team LiB ] Previous Section Next Section

Summary

In this hour, you learned how to use PHP's powerful DBA functions to store and retrieve data. You learned how to use dba_open() to acquire a DBA resource, which you can use with other DBA functions. You also learned how to add data to a database with dba_insert(), alter it with dba_replace(), and delete it with dba_delete(). You learned how to use dba_fetch() to retrieve data and how to use serialize() and unserialize() to save complex data structures to a database. Finally, you worked through an example that uses many of the techniques we have examined.

The DBA functions are useful for storing relatively small amounts of data that need to be queried only in a simple way. Inevitably, your needs will occasionally be more demanding than this. In the next chapter, we will cover MySQL, an open source SQL database.

    [ Team LiB ] Previous Section Next Section