Sorry about the Dokeos-specific function api_sql_query in the previous post. Here it is:
Code:
function api_sql_query($query,$file='',$line=0)
{
$result=mysql_query($query);
if($line && !$result)
{
@mysql_close();
die('SQL error in file <b>'.$file.'</b> at line <b>'.$line.'</b>'.
': <br>' . htmlspecialchars(strlen($query) < 200 ?
$query : substr($query, 0, 197).'...')); // RH
}
return $result;
}
I hope there are no other Dokeos functions or variables...