function getPollInfo($tIds) { $sql = 'SELECT * FROM ' . DB::table('forum_polloption') . ' WHERE tid IN (' . implode(',', $tIds) . ')'; $result = array(); $query = DB::query($sql); while ($row = DB::fetch($query)) { $result[$row['tid']][$row['polloptionid']] = SearchHelper::convertPoll($row); } return $result; }