Changeset 452 for branches/beta/inc


Ignore:
Timestamp:
Mar 1, 2009, 2:25:32 PM (16 years ago)
Author:
amun
Message:

Stránkování novinek... (pokus číslo 2)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/beta/inc/html.php

    r451 r452  
    219219        }
    220220        $this -> db -> select_db($db_webu);
    221         $sql = $this -> db -> query("SELECT * FROM `articles`".$where."ORDER BY `date` DESC;");
     221        $sql = $this -> db -> query("SELECT SQL_CALC_FOUND_ROWS * FROM articles ".$where." ORDER BY date DESC, id DESC LIMIT $limit OFFSET " . intval($_GET["offset"]);
    222222        if ($sql -> num_rows > 0)
    223223        {
     
    280280}
    281281
    282 $result = mysql_query("SELECT SQL_CALC_FOUND_ROWS * FROM tabulka ORDER BY datum DESC, id DESC LIMIT $limit OFFSET " . ($limit * $_GET["strana"]));
     282$result = mysql_query("SELECT SQL_CALC_FOUND_ROWS * FROM articles ".$where." ORDER BY date DESC, id DESC LIMIT $limit OFFSET " . ($limit * $_GET["strana"]));
    283283$pocet = mysql_result(mysql_query(" SELECT FOUND_ROWS()"), 0);
    284284if ($_GET["strana"]) {
Note: See TracChangeset for help on using the changeset viewer.