$ofset -10 a düşüyor
Aldğım hata
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:AppServwwwsayfailanlar.php on line 171
171. Satır
$sql çekmekte.
if (isset($_GET['s'])) {
$pageno = $_GET['s'];
} else {
$pageno = 1;
}
$no_of_records_per_page = 10;
$offset = ($pageno-1) * $no_of_records_per_page;
$conn=mysqli_connect($veritabani['host'],$veritabani['kullanici'],$veritabani['sifre'],$veritabani['veritabani']);
// Check connection
if (mysqli_connect_errno()){
echo "MYSQL Sunucusuna Bağlanılamadı: " . mysqli_connect_error();
die();
}
$total_pages_sql = "SELECT COUNT(*) FROM ilanlar";
$result = mysqli_query($conn,$total_pages_sql);
$total_rows = mysqli_num_rows($result)[0];
$total_pages = ceil($total_rows / $no_of_records_per_page);
echo $offset."";
echo $no_of_records_per_page;
$sql = mysql_query("SELECT * FROM ilanlar LIMIT $offset, $no_of_records_per_page");
mysqli_close($conn);