//session_unset();
$db_hostname='llcdb.mtsac.edu';
$db_database='llc';
$db_username='llc';
$db_password='lerncent';
require_once 'titleData.php';
// The script to add the new languages to the database
// connect to the database
$db_server = mysql_connect($db_hostname, $db_username, $db_password);
if (!$db_server) die("Unable to connect to MYSQL: " . mysql_error());
mysql_select_db($db_database)
or die("Unable to select database: " . mysql_error());
/*
$query = "SELECT address FROM RoadAddresses WHERE Address LIKE '$param%' Union SELECT StopName FROM Stops WHERE StopName LIKE '$param%'";
$result = mysql_query($query);
$num_rows = mysql_num_rows($result);
for ($x = 0; $x <$num_rows; $x++) {
if($x==10)
break;
$row = mysql_fetch_row($result);
*/
// get the list of all the languages
//$queryTitle="SELECT * FROM `OM_titles` ";
$queryTitle = "Select * from OM_titles order by language, title";
$resultTitle = mysql_query($queryTitle);
$num_rows = mysql_num_rows($resultTitle);
$titleArray=array();
//add the first element
$obj=new titleData(0,"Choose the Title","none","none",0,"none");
array_push($titleArray,$obj);
for ($x = 0;$x <$num_rows;$x++)
{
$row = mysql_fetch_row($resultTitle);
$id=$row[0];
$language=$row[1];
$name=$row[2];
$level=$row[3];
$type=$row[4];
$path=$row[5];
$obj=new titleData($id,$name,$language,$type,$level,$path);
array_push($titleArray,$obj);
}
// get the list of all the
//print_r($titleArray);
?>
Batch Upload