// PHP code snippet. Copyright 2008 Chirag Shah. // Code to create and execute a SQL query as well as reading the records.