Retrieving data from a database

One use of PHP scripts in web pages is to retrieve and display information contained in a database. The following examples demonstrate some useful techniques.

 Simple select query
 Fetching by column name
 Nested result sets