2
As of version 2.5.8, XOOPS no longer uses the deprecated mysql extension, so the mysql connection that is required for calls like
mysql_query() does not exist. This change was required to make XOOPS work with PHP 7.0 and above, where the mysql extension was removed. (See
this page on supported versions of PHP to understand why that is important. Time is running out for PHP 5.) The best approach in this case is to rewrite the code to use the standard database connection calls. It would look something like this (not tested, just off the cuff.)
$result = $xoopsDB->query('SELECT * FROM ' . $xoopsDB->prefix('myunit'));
if ($result===false) {
die($xoopsDB->error());
}
while ($row = $xoopsDB->fetchArray($result);) {
echo '';
}
Quote:
mjoel wrote: I have this query code in one of my custom page in XOOPS 2.572..and its working fine but when i upgraded to XOOPS 2.581 recently this no longer work..the page is not fully load and it stopped at this query $result= mysql_query("SELECT * FROM ".$xoopsDB->prefix("myunit")." ") or die(mysql_error());
while ($row = mysql_fetch_assoc($result)) {
echo '';
}
?>
what might be the problem ?