We can build ready-to-use queries with our specific database driver using the nameQuote()
and Quote()
methods. We must remember to use these two methods; if we do not, we run the risk of restricting our queries to MySQL databases.
We have discovered the wide variety of methods available to access the database, either through JDatabase
methods or JTable
methods. We can extend the abstract JTable
class by adding an extra element to the data access layer. JTable
allows us to perform many common actions on records. Taking advantage of the JTable
class can significantly reduce the overheads incurred while programming, and it ensures that we use standardized methods to perform actions.
We should now be able to successfully create new database table schemas; how we add these tables to the database is explained in more detail in the next chapter, Chapter 4, Extension Design. We will cover supporting classes, using the registry, accessing the user and session objects, and learn, in detail,...