include_once("db_connect.php"); include_once("config.php"); $path="photos/"; $max=9; $limit=$_GET["l"]; $limitNext = $limit+$max; $limitPrev = $limit-$max; if ($limit=="") { $limit=0; } if ($page=="") { $page="1"; } $sql="SELECT id, myName, mySurname, myPhoto, myVotes FROM " . $tblFan . " ORDER by myVotes DESC LIMIT " . $limit ."," . $max; $sql_result = mysql_query($sql, $connection) or die("Could not execute query - $sql"); $strSQL1 = "SELECT id FROM " . $tblFan; $sql_result1 = mysql_query($strSQL1, $connection) or die("Could not execute query - $strSQL1"); $totalNum = mysql_num_rows($sql_result1); $newL = ($max + $limit); $numPages = $totalNum/$max; //unset($_SESSION['vote']); ?>
|