Changeset 24 for trunk/www/table.php
- Timestamp:
- Jun 12, 2009, 11:40:00 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/table.php
r21 r24 65 65 foreach($this->QueryParameters as $Index => $Item) 66 66 $Table = str_replace('%'.$Index, $Item, $Table); 67 $DbResult = $Database->query('SELECT COUNT(*) FROM '.$Table.' ORDER BY T.'.$_GET['Column'].' '.$OrderType[$_GET['Order']]);67 $DbResult = $Database->query('SELECT COUNT(*) FROM '.$Table.' AS T ORDER BY T.'.$_GET['Column'].' '.$OrderType[$_GET['Order']]); 68 68 $DbRow = $DbResult->fetch_row(); 69 69 $this->TotalRowCount = $DbRow[0]; 70 70 if(array_key_exists('Page', $_GET)) $this->Page = $_GET['Page']; else $this->Page = 0; 71 71 if($this->Page > ($this->TotalRowCount / $Config['Web']['TableRowPerPage'])) $this->Page = 0; 72 $DbResult = $Database->query('SELECT * FROM '.$Table.' ORDER BY T.'.$_GET['Column'].' '.$OrderType[$_GET['Order']].' LIMIT '.($this->Page * $Config['Web']['TableRowPerPage']).', '.$Config['Web']['TableRowPerPage']);72 $DbResult = $Database->query('SELECT * FROM '.$Table.' AS T ORDER BY T.'.$_GET['Column'].' '.$OrderType[$_GET['Order']].' LIMIT '.($this->Page * $Config['Web']['TableRowPerPage']).', '.$Config['Web']['TableRowPerPage']); 73 73 while($DbRow = $DbResult->fetch_assoc()) 74 74 {
Note:
See TracChangeset
for help on using the changeset viewer.