PHP from 5.6 to 7.2 advice [duplicate]

Fatal error: Call to undefined function mysqli_result()

Hi,
I am having some issues migrating old code from Php 5.6 to 7.2 (I know, I’m late !).
The initial code was :

$datama=mysql_query("SELECT COUNT(*) as TOTALFOUNDA FROM errorlog WHERE IP ='$ff' and datenow>'$last' and counting='3'"); 
$anymatchesa=mysql_result($datama,0,"TOTALFOUNDA"); 

And I came up with this (the connexion to the DB with $conx is OK) :

$datama=mysqli_query($conx,"SELECT COUNT(*) as TOTALFOUNDA FROM errorlog WHERE IP ='$ff' and datenow>'$last' and counting='3'"); 
$anymatchesa=mysqli_result($datama,0,"TOTALFOUNDA"); 

But I get an error “Fatal error: Call to undefined function mysqli_result()”…

Could you help me out ?
Many Thanks !!!!