-
Book Overview & Buying
-
Table Of Contents
concrete5 Cookbook
By :
Web applications get a great deal of their capabilities from being connected to a database. concrete5 is a LAMP application (runs on Linux, Apache, MySQL, and PHP). MySQL is the database that concrete5 uses, which is the most popular open source database in the world.
In this chapter, we will discover the ways to interact with the database in concrete5, both with plain SQL queries, and with the more object-oriented active record approach. We will learn how to safeguard against SQL injection attacks, create custom model classes, and query the database using objects and active record.
This chapter will use some basic SQL queries, so some familiarity with writing database queries is recommended.
Before we are able to read and write to the database, we need to make sure concrete5 has the correct database credentials. Typically these credentials are set during installation, but if you are moving a concrete5 to another server or changing the username or...
Change the font size
Change margin width
Change background colour