- Timestamp:
- Mar 1, 2009, 2:32:06 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/beta/inc/html.php
r452 r453 218 218 $where = "WHERE `category` = '".$kategorie."'"; 219 219 } 220 $this -> db -> select_db($db_webu); 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"]); 222 if ($sql -> num_rows > 0) 220 mysql_connect($db_server, $db_user, $db_pass); 221 mysql_select_db($db_webu); 222 $limit = 5; 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) 223 227 { 224 228 // TODO !! 225 229 226 while ($row = $sql -> fetch_array())230 while ($row = mysql_fetch_array($sql)) 227 231 { 228 232 switch ($row["category"]) … … 269 273 } 270 274 271 mysql_connect($db_server, $db_user, $db_pass); 272 mysql_select_db($db_webu); 273 $limit = 5; 275 274 276 $pocet = mysql_result(mysql_query(" SELECT FOUND_ROWS()"), 0); 275 277 if ($_GET["offset"]) {
Note:
See TracChangeset
for help on using the changeset viewer.