Changeset 454 for branches/beta
- Timestamp:
- Mar 1, 2009, 2:39:01 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/beta/inc/html.php
r453 r454 222 222 $limit = 5; 223 223 224 $sql = mysql_query("SELECT SQL_CALC_FOUND_ROWS * FROM articles ".$where."ORDER BY date DESC, id DESC LIMIT $limit OFFSET " . intval($_GET["offset"]);225 $ sql_pocet = mysql_query(mysql_num_rows("SELECT date FROM articles ".$where.);226 if ($ sql_pocet > 0)224 $sql = mysql_query("SELECT * FROM articles $where ORDER BY date DESC, id DESC LIMIT $limit OFFSET " . intval($_GET["offset"]); 225 $pocet = mysql_query(mysql_num_rows("SELECT date FROM articles $where "); 226 if ($pocet > 0) 227 227 { 228 228 // TODO !! … … 274 274 275 275 276 $pocet = mysql_result(mysql_query(" SELECT FOUND_ROWS()"), 0); 276 277 277 if ($_GET["offset"]) { 278 278 echo "<a href='$_SERVER[PHP_SELF]" . ($_GET["offset"] != $limit ? "?offset=" . ($_GET["offset"] - $limit) : "") . "'>zpět</a>\n"; … … 283 283 284 284 $result = mysql_query("SELECT SQL_CALC_FOUND_ROWS * FROM articles ".$where." ORDER BY date DESC, id DESC LIMIT $limit OFFSET " . ($limit * $_GET["strana"])); 285 $pocet = mysql_result(mysql_query(" SELECT FOUND_ROWS()"), 0); 285 286 286 if ($_GET["strana"]) { 287 287 echo "<a href='$_SERVER[PHP_SELF]" . ($_GET["strana"] != 1 ? "?strana=" . ($_GET["strana"] - 1) : "") . "'>zpět</a>\n";
Note:
See TracChangeset
for help on using the changeset viewer.