diff --git a/webui/model/search/search.php b/webui/model/search/search.php index 7e9c634c..d60b0e39 100644 --- a/webui/model/search/search.php +++ b/webui/model/search/search.php @@ -420,11 +420,11 @@ class ModelSearchSearch extends Model { $s = $this->fixup_sphinx_operators($s); - $q = $this->sphx->query("SELECT id FROM $sphx_table WHERE uid=" . $session->get("uid") . " AND MATCH('@$field $s') "); + $q = $this->sphx->query("SELECT iid FROM $sphx_table WHERE uid=" . $session->get("uid") . " AND MATCH('@$field $s') "); if(ENABLE_SYSLOG == 1) { syslog(LOG_INFO, "sphinx query: " . $q->query . ", hits: " . $q->total_found); } foreach($q->rows as $a) { - $id_list .= "," . $a['id']; + $id_list .= "," . $a['iid']; } if($id_list) { $id_list = substr($id_list, 1, strlen($id_list)); }