how to solve this error: Warning: mysql_result() expects parameter 1 to be resource, object given in D:
$query = "SELECT c.CAS_ID, c.TITOLO, i.NOME,c.DES_BREVE,c.DESC_ESTESA,c.OFFERTA_SPECIALE FROM `CASE` c LEFT JOIN `IMMAGINI` i ON c.CAS_ID = i.CAS_ID where VISIBLE = 1 and DEF = 1 and HOME = 1 order by c.CAS_ID DESC";
$result = mysqli_query($mysqli , $query);
$num = mysqli_num_rows($result);
$i=0;
$count = 1;
while ($i < $num && $i <5) {
$id_case[]=mysql_result($result,$i,"CAS_ID");
}