<?php
include ("htmlparser.inc");
require_once("offlconfig.php");
require_once($DOC_ROOT . "/lib/header.php");
$sqllist = Array();
//change all nfl_profiles to point to CBS Sportsline
//$sqllist[0] = "ALTER TABLE nflteams DROP nflteam_schedulenamex";
$sqllist[1] = "ALTER TABLE nflteams ADD nflteam_schedulename varchar(100)";
$sqllist[2] = "UPDATE nflteams SET nflteam_schedulename = nflteam_city";
$sqllist[3] = "UPDATE nflteams SET nflteam_schedulename = 'N.Y. Jets' WHERE nflteam_name = 'Jets'";
$sqllist[4] = "UPDATE nflteams SET nflteam_schedulename = 'N.Y. Giants' WHERE nflteam_name = 'Giants'";
$db = new OFFL_DBObject();
$dbconn = $db->getConn();
foreach ($sqllist as $sql) {
$result = mysql_query($sql, $dbconn);
echo "$result - $sql<br>\n";
}
$db->closeDB();
echo "<br/>Any line with a - not preceded by a 1 means it failed! This is OK on ALTER TABLE if already executed!";
echo "<h2>Players NFL Teams table update complete!</h2>";
echo "This only needs to be executed once!";
?>