prefix("snews") . " WHERE 1"; if ($userid != 0) { $sql .= " AND uid=" . $userid . " "; } if (is_array($queryarray) && $count = count($queryarray)) { $sql .= " AND ((`title` LIKE '%{$queryarray[0]}%' OR `content` LIKE '%{$queryarray[0]}%' )"; for ($i = 1; $i < $count; $i++) { $sql .= " $andor "; $sql .= "(`title` LIKE '%{$queryarray[$i]}%' OR `content` LIKE '%{$queryarray[$i]}%' )"; } $sql .= ") "; } $sql .= "ORDER BY `update_time` DESC"; $result = $xoopsDB->query($sql, $limit, $offset); $ret = array(); $i = 0; while ($myrow = $xoopsDB->fetchArray($result)) { $ret[$i]['image'] = "images/icons/on.png"; $ret[$i]['link'] = "index.php?sn=" . $myrow['sn']; $ret[$i]['title'] = $myrow['title']; $ret[$i]['time'] = strtotime($myrow['update_time']); $ret[$i]['uid'] = $myrow['uid']; $i++; } return $ret; } ```
進階搜尋
577人線上 (194人在瀏覽線上書籍)
會員: 0
訪客: 577