ho fatto come dici te:

Codice PHP:
    $cordY=rand(0,3000);
    
$QueryY=mysql_query("Select LEFT from stars Where LEFT >= ($cordY - 1) AND LEFT <= ($cordY + 13)") or die (mysql_error()." errore verifica LEFT cordY"); 
ma sempre il solito errore:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from stars Where LEFT >= (1998 - 1) AND LEFT <= (1998 + 13)' at line 1 errore verifica LEFT cordY