Script Error with PHP 7.1

Asked

Viewed 68 times

2

I have a problem in a module that previously worked correctly in version 5.6 of PHP.

After upgrading the server’s PHP to 7.1 it stopped working, due to some functions that were previously present in PHP 5.6 and ceased to exist as of version 7.1.

When trying to run the module, returns me the following error:

Erro no Comando do Módulo
mysql_data_seek is not supported

Follows excerpt of the code with the function mysql_data_seek, where the error occurs:

  function _mysql_result($result, $iRow, $field = 0)
{
    if(!mysql_data_seek($result, $iRow))
        return false;
    if(!($row = mysql_fetch_array($result)))
        return false;
    if(!array_key_exists($field, $row))
        return false;
    return $row[$field];
}

According to PHP I need to change to Mysqli, but my knowledge is very limited in this issue.

If anyone can give me a light.

  • https://answall.com/questions/579/

  • You simply understand what each command does, check which is "relative" of the mysqli, and replaces them. Sometimes you change the order of the properties, sometimes they become even more simple and dry. You can! Just keep going through and understanding every snippet of your code.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.