Up to now, we've concentrated mainly on ensuring that you can connect to MySQL, either through the client or through PHP's mysql functions, and create and fill tables with data. One of the first SQL statements you came across in Chapter 9 was a basic SELECT statement. There's quite a lot more you can do to precisely define the kind of data you want to retrieve, and this chapter focuses on the different ways you can use PHP scripts to get at the data stored in a MySQL database.
We start off by looking at PHP's data retrieval functions, and then take a close look at how to construct SQL SELECT statements so that they access the data you want, arranged in the way you want.
You'll learn how to limit the number of results returned, and how to order and group them, and you'll build a "user record" viewer script that'll enable you to navigate around the database tables you developed in the last chapter.
