Search Songs Results

Search Again for different artist

“);
} else {
$sql_cnt = “SELECT count(*) as cnts FROM songs, cds WHERE songs.mp3cd = cds.cdid AND Artist LIKE ‘%” . $artist . “%’ AND SongTitle LIKE ‘%” . $songtitle . “%’ AND songs.mp3cd = ” . $cd;
//echo (“$sql_cnt” . “
“);
}
} else {
if ($_GET[‘type’] == ‘fulltext’) {
$sql_cnt = “SELECT count(*) as cnts FROM songs, cds WHERE MATCH ( SongTitle, Artist ) AGAINST ( ‘”.addslashes($_GET[‘p’]).”‘ ) and songs.mp3cd = cds.cdid “;
// echo (“$sql_cnt” . “
“);
} else {
$sql_cnt = “SELECT count(*) as cnts FROM songs, cds WHERE songs.mp3cd = cds.cdid AND Artist LIKE ‘%” . $artist . “%’ AND SongTitle LIKE ‘%” . $songtitle . “%’ ORDER BY Artist, SongTitle”;
//echo (“$sql_cnt” . “
“);
}
}
$res_cnt = mysql_query($sql_cnt, $conn);
$row_cnt = mysql_fetch_array($res_cnt);

//$artist = $_GET[‘artist’];
//$songtitle = $_GET[‘songtitle’];
//$cd = $_GET[‘cd’];

$query = ”;
foreach ($_GET as $key => $value) {
if (($key != ‘start_msg’) && ($key!=’count’) && ($key!=’page’)) {
$query .= “$key=”.urlencode($value).”&”;
}
}
$query = substr($query, 0, (strlen($query)-1));
//echo $query;

if (!isset($_GET[‘start_msg’])) {
//echo ‘not set’;
$pageing = get_paginator_str(1, $row_cnt[‘cnts’], 20, $query);
} else {
//echo ‘set’;
$pageing = get_paginator_str($_GET[‘start_msg’], $row_cnt[‘cnts’], 20, $query);
}
//
//###########################################
//code for pagination

if ($cd != 0) {
if ($_GET[‘type’] == ‘fulltext’) {
$sql = ”
SELECT SongTitle, Artist, cdtitle,
MATCH ( SongTitle, Artist ) AGAINST ( ‘”.addslashes($_GET[‘p’]).”‘ ) AS matchno
FROM songs, cds
WHERE MATCH ( SongTitle, Artist )
AGAINST ( ‘”.addslashes($_GET[‘p’]).”‘ )
AND songs.mp3cd = cds.cdid
AND songs.mp3cd = $cd
ORDER BY matchno desc, Artist, SongTitle limit $start_msg, 20
“;
// echo (“$sql” . “
“);
} else {
$sql = “SELECT Artist, SongTitle, cdtitle FROM songs, cds WHERE songs.mp3cd = cds.cdid AND Artist LIKE ‘%” . $artist . “%’ AND SongTitle LIKE ‘%” . $songtitle . “%’ AND songs.mp3cd = ” . $cd . ” ORDER BY Artist, SongTitle limit $start_msg, 20″;
//echo (“$sql” . “
“);
}
} else {
if ($_GET[‘type’] == ‘fulltext’) {
$sql = ”
SELECT SongTitle, Artist, cdtitle,
MATCH ( SongTitle, Artist ) AGAINST ( ‘”.addslashes($_GET[‘p’]).”‘ ) AS matchno
FROM songs, cds
WHERE MATCH ( SongTitle, Artist )
AGAINST ( ‘”.addslashes($_GET[‘p’]).”‘ )
AND songs.mp3cd = cds.cdid
ORDER BY matchno desc, Artist, SongTitle limit $start_msg, 20
“;
// echo (“$sql” . “
“);
} else {
$sql = “SELECT Artist, SongTitle, cdtitle FROM songs, cds WHERE songs.mp3cd = cds.cdid AND Artist LIKE ‘%” . $artist . “%’ AND SongTitle LIKE ‘%” . $songtitle . “%’ ORDER BY Artist, SongTitle limit $start_msg, 20”;
//echo (“$sql” . “
“);
}
}

$result = @mysql_query($sql, $conn);

?>

0) {
while ($row = mysql_fetch_assoc($result)) {
echo (“

“);
echo (“

“);
echo (“

‘);
echo (“

‘);
echo (“

‘);
$sr = $sr + 1;
echo (“

“);
}
echo (“

“);
}else {
echo (“

“);
}
?>

Sr. Artist Song Title MP3 CD
$sr  ” . $row[‘Artist’] . ‘  ” . $row[‘SongTitle’] . ‘ ” . $row[‘cdtitle’] . ‘
Total of ” . $row_cnt[‘cnts’] . ” record(s)
No matches found

Search Again for different artist

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.