1
slyss
Why this query don't work into 2.2.x? but it work into 2.0.x ?
  • 2006/11/26 10:00

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


hi guys

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 )
{
echo 
".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
[size=x-large]2008 Xoops Book[/size]

2
Dave_L
Re: Why this query don't work into 2.2.x? but it work into 2.0.x ?
  • 2006/11/26 11:35

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Do you get any error messages? (with PHP debug and MySQL debug enabled)

3
slyss
Re: Why this query don't work into 2.2.x? but it work into 2.0.x ?
  • 2006/11/26 11:44

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


Quote:

Dave_L wrote:
Do you get any error messages? (with PHP debug and MySQL debug enabled)


i get

Parse errorparse errorunexpected ')' in /hsphere/local/home/stefalia/stefanosnetwork.com/site/modules/system/blocks/system_blocks.php(40) : eval()'d code on line 4


or with another query

Notice [PHP]: Undefined variabledirectory in file modules/system/blocks/system_blocks.php(40) : eval()'d code line 18
[size=x-large]2008 Xoops Book[/size]

4
slyss
Re: Why this query dont work into 2.2.x? but it work into 2.0.x ?
  • 2006/11/26 11:56

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


sorry Dave_L....

apparently was only a my mistake....

sorry and thanks fot your time...

stefano by italy
[size=x-large]2008 Xoops Book[/size]

Login

Who's Online

294 user(s) are online (251 user(s) are browsing Support Forums)


Members: 0


Guests: 294


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits