1) { return implode(",",$aTagIDs); } return $aTagIDs[0]; } /* * Generate a string that can be used in a SQL query * from the list of documents the user is allowed to see */ function getSQLSearchString($sSearchString) { $aWords = explode(" ", $sSearchString); $sSQLSearchString; for ($i = 0; $i < count($aWords) - 1; $i++) { $sSQLSearchString .= "(DFL.value LIKE '%" . $aWords[$i] . "%') OR "; } $sSQLSearchString .= "(DFL.value LIKE '%" . $aWords[count($aWords) -1] . "%')"; return $sSQLSearchString; } ?>