Songtekst

[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 = 10;

$startLimit = $_REQUEST[‘startLimit’];
$numberOfRows = $_REQUEST[‘rows’];
$sortBy = $_REQUEST[‘sortBy’];
$sortOrder = $_REQUEST[‘sortOrder’];

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;
}

$sql = “SELECT DISTINCT cd FROM songtekst ORDER BY id”;
$result2 = MYSQL_QUERY($sql);

$numberOfRows = MYSQL_NUM_ROWS($result2);

if ($numberOfRows==0) {
?>

Sorry. No records found !!

0) {

$i=0;

// Printing results in HTML
?> \n”;
?>