Techek,
Thanks for the help.
I tried the syntax and it didn't work i got almost the same error. I think mysql has a problem using ORDER BY and LIMIT in a DELETE query.
But i already thought of another way to solve the problem.
I used the following code:
$query="SELECT score, user_ID, mod_date FROM $dance_score_table ORDER BY score DESC, mod_date ASC;";
$result=mysql_query($query);
$last_score=mysql_result($result, $max_scores_limit-1, score);
$last_date=mysql_result($result, $max_scores_limit-1, mod_date);
$query="DELETE FROM $dance_score_table
WHERE (score<$last_score)OR(score=$last_score AND mod_date>$last_date)";
$result=mysql_query($query);
if(!$result)error_message(sql_error());
There is some irrelevant code in this but i think you can see what i did here.
Thanks for the help anyway.