4
thanks
trabidI change code be
$kwd = isset($_REQUEST['kwd']) ? trim($myts->stripSlashesGPC($_REQUEST['kwd'])) : '';
$compl = isset($_REQUEST['compl']) ? trim($myts->stripSlashesGPC($_REQUEST['compl'])) : '0';
if (!empty($kwd)) {
$search_column = array('tag', 'title', 'note');
$search_sql = '(';
foreach ($search_column as $column) {
$search_sql .= $column.' LIKE '.$xoopsDB->quoteString('%'.$kwd.'%').' OR ';
}
$search_sql = substr($search_sql, 0, -4);
$search_sql .= ')';
$criteria[] = $search_sql;
}
if ($compl != 'all') {
$criteria[] = 'complete = '.$xoopsDB->quoteString($compl);
}