Summary


This chapter took a look at working with databases and the various options that PHP gives you here. Being able to handle databases in your PHP code is very powerful because you can manage and store data on the server. Here are some of this chapter's salient points:

  • You can connect to database servers with PHP functions such as mysql_connect, and you can select a database with functions such as mysql_select_db.

  • You can create a database with the CREATE statement.

  • You can also create tables and specify the type of data they'll hold with the CREATE statement.

  • You can store data in a database with the INSERT statement.

  • You can recover data from a database table with the SELECT statement.

  • You can update data in a database table with the UPDATE statement.

  • You can also delete data from database tables with the DELETE statement.



    Spring Into PHP 5
    Spring Into PHP 5
    ISBN: 0131498622
    EAN: 2147483647
    Year: 2006
    Pages: 254

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net