Changeset 665 for trunk/Modules/IS/IS.php
- Timestamp:
- Jul 6, 2014, 10:15:07 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/IS/IS.php
r664 r665 339 339 array('Name' => $ItemIndex, 'Type' => $FormItem['Type'])); 340 340 if(array_key_exists('Filter'.$ItemIndex, $_POST) and ($_POST['Filter'.$ItemIndex] != '')) 341 $UserFilter .= ' AND ('.$FilterName.' LIKE "%'.$_POST['Filter'.$ItemIndex].'%")'; 342 } 343 } 344 if(($Filter == '') and ($UserFilter != '')) $Filter = '1 '.$UserFilter; 345 if($Filter != '') $Filter = ' WHERE '.$Filter; 341 { 342 if($UserFilter != '') $UserFilter .= ' AND '; 343 $UserFilter .= '('.$FilterName.' LIKE "%'.$_POST['Filter'.$ItemIndex].'%")'; 344 } 345 } 346 } 347 if($UserFilter != '') 348 { 349 if($Filter != '') $Filter = ' AND'; 350 $Filter .= ' '.$UserFilter; 351 } 352 if($Filter != '') $Filter = ' HAVING '.$Filter; 346 353 347 354 foreach($FormClass['Items'] as $ItemIndex => $FormItem) … … 386 393 if($Filter != '') 387 394 { 388 $Query = 'SELECT COUNT(*) FROM '.$SourceTable.' '.$Filter;395 $Query = 'SELECT COUNT(*) FROM (SELECT '.$Columns.' FROM '.$SourceTable.' '.$Filter.') AS `TS`'; 389 396 $DbResult = $this->Database->query($Query); 390 397 $DbRow = $DbResult->fetch_row();
Note:
See TracChangeset
for help on using the changeset viewer.