includes/search.php
changeset 758 6b79a49f85f0
parent 757 7ba7b85e1195
child 801 eb8b23f11744
equal deleted inserted replaced
757:7ba7b85e1195 758:6b79a49f85f0
  1000     if ( isset($options['datacolumn']) )
  1000     if ( isset($options['datacolumn']) )
  1001       $columns .= ", {$options['datacolumn']}";
  1001       $columns .= ", {$options['datacolumn']}";
  1002     if ( isset($options['additionalcolumns']) )
  1002     if ( isset($options['additionalcolumns']) )
  1003       $columns .= ', ' . implode(', ', $options['additionalcolumns']);
  1003       $columns .= ', ' . implode(', ', $options['additionalcolumns']);
  1004     
  1004     
       
  1005     $additionalwhere = ( isset($options['additionalwhere']) ) ? $options['additionalwhere'] : '';
       
  1006     
  1005     $sql = "SELECT $columns FROM " . table_prefix . "{$options['table']} WHERE ( $where ) $additionalwhere;";
  1007     $sql = "SELECT $columns FROM " . table_prefix . "{$options['table']} WHERE ( $where ) $additionalwhere;";
  1006   
  1008   
  1007     if ( !($q = $db->sql_unbuffered_query($sql)) )
  1009     if ( !($q = $db->sql_unbuffered_query($sql)) )
  1008     {
  1010     {
  1009       $db->_die('Automatically generated search query');
  1011       $db->_die('Automatically generated search query');