$sql = "SELECT id,rus,eng FROM words WHERE (correct<2 AND id < (ABS(ROUND(((SELECT COUNT(*) FROM words WHERE correct < 2)-1)*RANDOM()+1)/9223372036854775807))) ORDER BY id DESC LIMIT 1;";
$result = $db->query($sql);
$arr = $result->fetch(PDO::FETCH_ASSOC);