include_once "admin/functions.inc.php"; include_once "admin/db.inc.php"; // ### CONNECT TO DB if (!($connection = @ mysql_connect($hostname, $username, $password))) die("REGISTRATION: Cannot connect: " . mysql_error()); if (!(mysql_select_db($databasename, $connection))) { print("Category: connect\n"); showerror(); }; // $qs = "SELECT * FROM races WHERE type = 'FAC' AND open = 1;"; $qs = "SELECT * FROM races WHERE type = 'RTN' AND open = 1 ORDER BY start ASC;"; if (!($result = @ mysql_query ($qs, $connection))) showerror(); $num_rows = mysql_num_rows($result); $races = array(); $i = 1; while ($row = mysql_fetch_array($result)) { $row["num"] = $i++; $races[] = $row; }; // dumptext($races); $prices = array(); $names = array(); $codes = array(); $dates = array(); foreach($races as $k) { $prices[] = "\"" . $k["price1"] . "\""; $names[] = "\"" . $k["name"] . "\""; $codes[] = "\"" . $k["raceid"] . "\""; $dates[] = "\"" . $k["date"] . "\""; }; // dumptext($prices); // dumptext($names); // dumptext($codes); // dumptext($dates); ?>
require('common/RTN/leftmenu2012.php'); ?> |
require('common/footer.php'); ?> |