|
@ $db = mysql_pconnect("localhost","icc2004","iccconf");
if (!$db)
{
echo " Error: Could not connect to database server." . mysql_error() . ". Please try again later.";
exit;
}
@ $database = mysql_select_db("registrationdb",$db);
if (!$database)
{
echo "Error: Could not open database." . mysql_error() . ". Please try again later.";
//exit;
}
$query = "select Id,AbstractTitle,AuthorLast,AuthorFirst,Organization from registrationtb order by AuthorLast";
$result = mysql_query($query);
if ($result) {
$numrows = mysql_num_rows($result);
if ($numrows == 0){
echo "Error: The database is empty.";
}else{
echo("
Name |
Institution |
Title |
Abstract |
Presentation |
");
for ($index = 0; $index < $numrows; $index++){
// $rowsdata will contain all the information for a row
$rowdata = mysql_fetch_object($result);
$filename = "pdfconf/" . $rowdata->Id . $rowdata->AuthorLast . ".pdf";
if (is_file($filename))
$pdf = "pdf";
else
$pdf = "";
echo("
$rowdata->AuthorLast, $rowdata->AuthorFirst |
$rowdata->Organization |
$rowdata->AbstractTitle |
details |
".$pdf." |
");
}
echo(" ");
}
}else{
echo "Error: Could not retrieve the data from the database." . mysql_error() . ". ";
}
?>
|