PHP Classes

suggest adding mysql_numrows

Recommend this page to a friend!

      PHP MySQL to MySQLi  >  All threads  >  suggest adding mysql_numrows  >  (Un) Subscribe thread alerts  
Subject:suggest adding mysql_numrows
Summary:suggest adding mysql_numrows to mysql2i.func.php
Messages:1
Author:mike mcdowell
Date:2018-09-10 19:22:27
 

  1. suggest adding mysql_numrows   Reply   Report abuse  
Picture of mike mcdowell mike mcdowell - 2018-09-10 19:22:27
For backward compatibility, mysql_numrows(), a deprecated alias, may be used for mysql_num_rows until php 7. We found many instances of mysql_numrows in the code we are maintaining and found that the easiest fix was to add the code below to the mysql2i.func.php file after the definition of mysql_num_rows:

function mysql_num_rows($result){

return mysql2i::mysql_num_rows($result);

}

# added function mysql_numrows which is a backward compatible synonym of mysql_num_rows
function mysql_numrows($result){

return mysql2i::mysql_num_rows($result);

}

This worked in our testing and saved us making code changes.

Mike