Tour Selection | |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
Tour Selection | ||||||||||||||||||||||||||
NConnect($hostName,$username,$password); $query = " SELECT distinct category_id FROM Category"; $recordSet = $conn->Execute($query); //Check for errors if (!$recordSet) print $conn->ErrorMsg(); else { print " Please select a category from the drop down list "; //Notice how it calls itself print ""; } //Create the Query // Start a query ... $query = "SELECT t.category, t.tour_code, t.day_of_week, t.description, t.cost_per_person FROM tour t "; if ($category != "All") { //Note the literal abound $regionName $query .= " Where t.category = '$category'"; } // ... and then complete the query. $query .= " ORDER BY t.category"; //Get the recordset $recordSet = $conn->Execute($query); if (!$recordSet) print $conn->ErrorMsg(); else print " Our Tours From $category"; print "
|
|
|
|
|
|
|
|
|
|
|