1
Can anyone help me with this error:
Notice [PHP]: Use of undefined constant num_boxes - assumed 'num_boxes' in file modules/lcas/blocks/lcas.php line 14I'm new to XOOPS module programming, sorry if this is obvious. Here is the affected code:
Quote:
<?php
function letterbox_show($options){
global $xoopsDB;
// Pick total number of boxes listed
$count = 0;
$sql = "select * from ".$xoopsDB->prefix('box_info')."";
$result = $xoopsDB->query($sql);
while($row = $xoopsDB->fetchArray( $result)) {
$sql1 = "select num_boxes from ".$xoopsDB->prefix('box_info')." where boxid = '$row[boxid]'";
$result1 = $xoopsDB->query($sql1);
while($row1 = $xoopsDB->fetchArray( $result1)) {
$count = $count + $row1[num_boxes];
}
}
Line # 14 is this one: $count = $count + $row1[num_boxes];
The block is working just fine, it's that I get this error when PHP Debug is one and, well, being anal about things like this, even though I can 'mute' it I want to know why it's giving me that error.
Any help is greatly appericated.