prepare("SELECT ID FROM konverents WHERE name LIKE ?"); $otsitav="%%"; if(isSet($_REQUEST["name"])){$otsitav="%$_REQUEST[name]%";} $kasklus->bind_param("s", $otsitav); $kasklus->bind_result($id); $kasklus->execute(); header("Content-type: text/plain"); $vastus=""; while($kasklus->fetch()){ $vastus.=$id." "; } $vastus=trim($vastus); echo $vastus; $yhendus->close();