[insert_php]
if (!$link = mysql_connect(‘rdbms.strato.de’, ‘U2773866’, ‘IrvYSUDmBbjrF52pr’)) {
echo ‘Could not connect to mysql’;
exit;
}
if (!mysql_select_db(‘DB2773866’, $link)) {
echo ‘Could not select database’;
exit;
}
$initStartLimit = 0;
$limitPerPage = 30;
$startLimit = $_REQUEST[‘startLimit’];
$numberOfRows = $_REQUEST[‘rows’];
$sortBy = $_REQUEST[‘sortBy’];
$sortOrder = $_REQUEST[‘sortOrder’];
$albumName = $_GET[‘id’];
//$albumName = ‘Ultra’;
/////////////////leeg albumnaam
if ($albumName==””){$albumName = “Geen Album”;
echo “Klik hier om terug te gaan naar het overzicht”;}
///////////////////////////////
if ($startLimit==””)
{
$startLimit = $initStartLimit;
}
if ($numberOfRows==””)
{
$numberOfRows = $limitPerPage;
}
if ($sortOrder==””)
{
$sortOrder = “DESC”;
}
if ($sortOrder == “DESC”) { $newSortOrder = “ASC”; } else { $newSortOrder = “DESC”; }
$limitQuery = ” LIMIT “.$startLimit.”,”.$numberOfRows;
$nextStartLimit = $startLimit + $limitPerPage;
$previousStartLimit = $startLimit – $limitPerPage;
if ($sortBy!=””)
{
$orderByQuery = ” ORDER BY “.$sortBy.” “.$sortOrder;
}
$sql1 = “SELECT * FROM songtekst WHERE cd = ‘$albumName’ ORDER BY cdnummer”;
$result1 = MYSQL_QUERY($sql1);
//$sql2 = “SELECT * FROM songtekst WHERE cd = ‘$albumName’ AND cdnummer in (2, 4, 6, 8, 10, 12, 14, 16, 18, 20)”;
//$result2 = MYSQL_QUERY($sql2);
$sql3 = “SELECT nummer FROM songtekst WHERE cd = ‘$albumName’ ORDER BY cdnummer”;
$result3 = MYSQL_QUERY($sql3)or die(mysql_error());
//$numberOfRows = MYSQL_NUM_ROWS($result1);
//$numberOfRows2 = MYSQL_NUM_ROWS($result2);
$numberOfRows3 = MYSQL_NUM_ROWS($res3);
if ($numberOfRows==0) {
?>
} else if ($numberOfRows>0) {
$i=0;
?>
echo $albumName ?>
[expand title=” echo stripslashes($thisNummer3) ?>” trigclass=”noarrow”]
echo stripslashes($thisSongtekst1); ?>[/expand]
$i++;
} // end while loop
?>
} // end of if numberOfRows > 0
// Free resultset
mysql_free_result($result3);
///
///
[/insert_php]