Page 439 - Beginning PHP 5.3
P. 439

Chapter 13: Retrieving Data from MySQL with PHP
                           Now click a username in the member list. You ’ ll be taken to the  view_member.php  script, which should
                         look similar to Figure 13 - 2. Click the Back link to return to the members list.





































                           Figure 13-2

                           You ’ re now well on your way to writing complex, database - driven PHP applications. The next logical
                         step, of course, is to create applications that can write data to a database, rather than just retrieve data,
                         and you do this in the next chapter.



                           Summary

                           In this chapter you expanded on your knowledge of both MySQL and PDO, and learned how to create
                         PHP applications that are capable of reading data from database tables and displaying the data to the user:

                            ❑       First you set up the tables for an imaginary book club database that you used throughout the
                                chapter. Along the way, you explored the   BINARY  attribute and case - sensitivity; the  UNIQUE
                                constraint for enforcing unique values in a column; the   ENUM  data type for creating fields with a
                                small number of possible values; and the   TIMESTAMP  data type for automatically recording
                                when records are created or updated





                                                                                                         401





                                                                                                      9/21/09   9:12:07 AM
          c13.indd   401
          c13.indd   401                                                                              9/21/09   9:12:07 AM
   434   435   436   437   438   439   440   441   442   443   444