Signed-off-by: Stéphane Jacob <sj@m4x.org>
$where .= "name LIKE '%" . $name_array[$i] . "%'";
}
}
- $res = XDB::iterator('SELECT name
- FROM profile_job_enum
- WHERE ' . $where);
- $this->suggestions = "| ";
- while ($sug = $res->next()) {
- $this->suggestions .= $sug['name'] . " | ";
+ if ($where != '') {
+ $res = XDB::iterator('SELECT name
+ FROM profile_job_enum
+ WHERE ' . $where);
+ $this->suggestions = "| ";
+ while ($sug = $res->next()) {
+ $this->suggestions .= $sug['name'] . " | ";
+ }
}
}