i have made a custon block PHP with this code:
global $xoopsDB;
if($xoopsUser) {
$sql = "SELECT * FROM ".$xoopsDB->prefix('myalbum2_photos')." WHERE submitter = ".$xoopsUser->getVar('uid')." ORDER BY rand() LIMIT 1");
$result = $xoopsDB->query($sql);
$myrow = $xoopsDB->fetchArray($result);
$lid_photo_profile = $myrow['lid'];
$ext_photo_profile = $myrow['ext'];
$RowsNum = $xoopsDB->getRowsNum($result);
if($RowsNum > 0 )
{
echo "<img src='".XOOPS_URL."/uploads/thumb2/".$lid.".".$ext."' border='0' width='30' alt="Stefano Spadoni Network'>" ;
}
else
{
echo "non hai la thumb" ; //codice se la condizione è falsa;
}
}
this query work in 2.0.15 but he dosn't work in 2.2.5 ...
do you know why ?...
thanks a lot