O'Reilly logo

Getting Started with Phalcon by Stephan Miller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Handling Data in Phalcon

Unless you are building an application that retrieves all of its data via APIs, you are most likely going to need a database in the application. Phalcon gives you a few ways to access data from PHP. In the previous chapter, we didn't interact directly with our MySQL database. We could create blog posts and store them in our database, but Phalcon models did all of the dirty work for us. All we did was add the database connection details to our configuration file.

There are a few more features our models can handle before we have to start using more of the available Phalcon features. But even the simplest application will grow to the point where unique database queries come into play. However, databases are not ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required