the code is:
$db = mysql_connect($host, $user, $password);
mysql_select_db("$database",$db);
$sql="SELECT * FROM searchidx WHERE id=$id";
$result=mysql_query($sql,$db);
$num = mysql_num_rows($result);
$cur = 1;
while ($num >= $cur) {
$row = mysql_fetch_array($result);
$title = $row["inktitle"];
...but i cant see any problems and the fields in the mysql are nothing more than VARCHAR apart from the id ofcourse