Location: PHPKode > projects > Local Lyric Displayer > lyrics/SHOWALL.PHP
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//Tr">

<html>
<head>
	<title>Þarký Göster</title>
	<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-9">
</head>
<link rel="stylesheet" type="text/css" href="lyrics.css">
<body>
<table border="0" width="600">
	<tr>
		<td class="no"><a href="showall.php?sort=no">No</a></td>
		<td class="bandname"><a href="showall.php?sort=bandname">Grup Adý</a></td>
		<td class="albumname"><a href="showall.php?sort=albumname">Albüm Adý</a></td>
		<td class="songname"><a href="showall.php?sort=songname">Þarký Adý</a></td>
		<td class="songname">Diðer</td>
	</tr>
<?php 
include ('connect.php');
	if ($sort == "") {
	$sql_string = "select * from lyrics";
	} else {
	$sql_string = "select * from lyrics order by " . $sort ;
	}
	//echo $sql_string;
	$result = mysql_db_query ("lld", $sql_string)
    or die ("Query failed");
# get column metadata
$i = 0;

$num_rows = mysql_num_rows($result); 

    for ($i ; $i <= mysql_num_rows ($result) - 1; $i++) {
        if (!mysql_data_seek ($result, $i)) {
            printf ("Cannot seek to row %d\n", $i);
            continue;
        }
 if ($num_rows > 0) {
	$update_result = mysql_db_query ("lld", $sql_update);
	$row = mysql_fetch_object ($result);
	$no = $row->no;
	$albumname = $row->albumname;
	$bandname_sql = $row->bandname;
	$songname = $row->songname;

	$sql_string_band = "select * from bandnames where bandid = " . $bandname_sql;
	//echo $sql_string_band;
	$result_band = mysql_db_query ("lld", $sql_string_band) or die ("Query failed");
	$num_rows_band = mysql_num_rows($result_band);
	$row_band = mysql_fetch_object ($result_band);
	$bandid = $row_band->bandid;
	$bandname = $row_band->bandname;
?>
	<tr>
		<td class="no"><?=$no?></td>
		<td class="bandname"><a href="showband.php?band=<?=$bandid?>"><?=htmlspecialchars(ucwords(stripslashes($bandname)))?></a></td>
		<td class="albumname"><?=htmlspecialchars(ucwords(stripslashes($albumname)))?></td>
		<td class="songname"><a href="show.php?a=<?=htmlspecialchars(ucwords(stripslashes($bandname)))?>&t=<?=htmlspecialchars(ucwords(stripslashes($songname)))?>&count=no&target=_self"><?=htmlspecialchars(ucwords(stripslashes($songname)))?></td>
		<td class="songname"><a href="sil.php?no=<?=$no?>">Sil</a></td>
	</tr>
<?
	}
}
    mysql_free_result ($result);
?>
</table>
</body>
</html>
Return current item: Local Lyric Displayer