Create the Class Room, Upload the Image. Then go to view the Class Room List and we get this:
Warning: Division by zero in /home/mydatery/public_html/inc/classes/BxDolClassRooms.php on line 1839
SELECT `Clrooms`.*, UNIX_TIMESTAMP( `Clrooms`.`created`) AS 'created_UTS', `ClroomsCateg`.`Name` AS `categName`, `ClroomsCateg`.`Uri` AS `categUri`, COUNT( `ClroomsMembers`.`memberID` ) AS `membersCount`, `ClroomsGallery`.`seed`, `ClroomsGallery`.`ext` AS `thumbExt` FROM `Clrooms` INNER JOIN `ClroomsCateg` ON `ClroomsCateg`.`ID` = `Clrooms`.`categID` LEFT JOIN `ClroomsMembers` ON (`ClroomsMembers`.`clroomID` = `Clrooms`.`ID` AND `ClroomsMembers`.`status`='Active') LEFT JOIN `ClroomsGallery` ON (`Clrooms`.`thumb` = `ClroomsGallery`.`ID`) WHERE (`Clrooms`.`status` = 'Active') GROUP BY `Clrooms`.`ID` ORDER BY `membersCount` DESC, `Clrooms`.`ID` DESC LIMIT -0,
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-0,' at line 18
at line 1870. Called db_res function with erroneous argument #0
Debug backtrace:
Array ( [1] => Array ( [file] => /home/mydatery/public_html/inc/classes/BxDolClassRooms.php [line] => 1870 [function] => db_res [args] => Array ( [0] => SELECT `Clrooms`.*, UNIX_TIMESTAMP( `Clrooms`.`created`) AS 'created_UTS', `ClroomsCateg`.`Name` AS `categName`, `ClroomsCateg`.`Uri` AS `categUri`, COUNT( `ClroomsMembers`.`memberID` ) AS `membersCount`, `ClroomsGallery`.`seed`, `ClroomsGallery`.`ext` AS `thumbExt` FROM `Clrooms` INNER JOIN `ClroomsCateg` ON `ClroomsCateg`.`ID` = `Clrooms`.`categID` LEFT JOIN `ClroomsMembers` ON (`ClroomsMembers`.`clroomID` = `Clrooms`.`ID` AND `ClroomsMembers`.`status`='Active') LEFT JOIN `ClroomsGallery` ON (`Clrooms`.`thumb` = `ClroomsGallery`.`ID`) WHERE (`Clrooms`.`status` = 'Active') GROUP BY `Clrooms`.`ID` ORDER BY `membersCount` DESC, `Clrooms`.`ID` DESC LIMIT -0, ) ) [2] => Array ( [file] => /home/mydatery/public_html/inc/classes/BxDolClassRooms.php [line] => 58 [function] => PageCompClroomsSearchResults [class] => BxDolClassRooms [type] => -> [object] => BxDolClassRooms Object ( [sCurrFile] => clr.php [bAdminMode] => [bUseFriendlyLinks] => [sSubClrPath] => clrooms/ [sClrPath] => /home/mydatery/public_html/clrooms/ [sClrGalPath] => /home/mydatery/public_html/clrooms/gallery/ [sSpacerIcon] => http://mydatery.com/templates/base/images/icons/spacer.gif ) [args] => Array ( [0] => [1] => 0 [2] => 0 [3] => 0 [4] => 0 [5] => membersCount [6] => 1 ) ) [3] => Array ( [file] => /home/mydatery/public_html/clr.php [line] => 237 [function] => GenIndexPageOfClrooms [class] => BxDolClassRooms [type] => -> [object] => BxDolClassRooms Object ( [sCurrFile] => clr.php [bAdminMode] => [bUseFriendlyLinks] => [sSubClrPath] => clrooms/ [sClrPath] => /home/mydatery/public_html/clrooms/ [sClrGalPath] => /home/mydatery/public_html/clrooms/gallery/ [sSpacerIcon] => http://mydatery.com/templates/base/images/icons/spacer.gif ) [args] => Array ( ) ) )Now here is the string of code from 1839 BxDolClassRooms.php
global $oTemplConfig;
global $site;
global $tmpl;
global $aPreValues;
$sortOrder = 'DESC';
else
$sortOrder = 'ASC';
if( $sSearchby == 'name' )
$aQueryWhere[] = "UPPER(`Clrooms`.`Name`) LIKE '%{$sKeyword}%'";
else
$aQueryWhere[] = "(UPPER(`Clrooms`.`Name`) LIKE '%{$sKeyword}%') OR (UPPER(`Clrooms`.`About`) LIKE '%{$sKeyword}%') OR (UPPER(`Clrooms`.`Desc`) LIKE '%{$sKeyword}%')";
}
$aQueryWhere[] = "`Clrooms`.`categID`='{$iCategID}'";
$aQueryWhere[] = "`Clrooms`.`Country`='{$sCountry}'";
$aQueryWhere[] = "UPPER(`Clrooms`.`City`) LIKE '%{$sCityVal}%'";
$SRdbTitle = _t( '_Top Clrooms' );
else
$SRdbTitle = _t( '_Clrooms search results' ); //SearchResultDesignBoxTitle
if( $iTotalNum > 0 ) {
$iPerPage = $oTemplConfig -> iClroomsSearchResPerPage;
$iPagesNum = ceil( $iTotalNum / $iPerPage );
$iPage = (int)$_REQUEST['page'];
$iPage = 1;
if( $iPage > $iPagesNum )
$iPage = $iPagesNum;
SELECT
`Clrooms`.*,
UNIX_TIMESTAMP( `Clrooms`.`created`) AS 'created_UTS',
`ClroomsCateg`.`Name` AS `categName`,
`ClroomsCateg`.`Uri` AS `categUri`,
COUNT( `ClroomsMembers`.`memberID` ) AS `membersCount`,
`ClroomsGallery`.`seed`,
`ClroomsGallery`.`ext` AS `thumbExt`
FROM `Clrooms`
INNER JOIN `ClroomsCateg` ON `ClroomsCateg`.`ID` = `Clrooms`.`categID`
LEFT JOIN `ClroomsMembers`
ON (`ClroomsMembers`.`clroomID` = `Clrooms`.`ID` AND `ClroomsMembers`.`status`='Active')
LEFT JOIN `ClroomsGallery`
ON (`Clrooms`.`thumb` = `ClroomsGallery`.`ID`)
{$sQueryWhere}
GROUP BY `Clrooms`.`ID`
ORDER BY `{$sSortby}` {$sortOrder}, `Clrooms`.`ID` DESC
LIMIT {$iSqlFrom}, {$iPerPage}
";
$iShowingFrom = $iSqlFrom + 1;
$iShowingTo = $iSqlFrom + $iNumOnPage;
$sPagesUrl = ";";
$pages alt= "switchClroomsSearchPage({page}); return false;";
$sGenPaginati alt= genPagination( $iPagesNum, $iPage, $sPagesUrl, $pagesOnclick );
}
if( $iCategID ) {
$arrCateg = db_arr( "SELECT `Name` FROM `ClroomsCateg` WHERE `ID`='{$iCategID}'" );
if( $arrCateg['Name'] ) {
$sCategName = _t( '_Category' ).': '.htmlspecialchars_adv( $arrCateg['Name'] );
$SRdbTitle = $sCategName;
$sBreadCrumbs = <<<EOJ
<div class="clrooms_breadcrumbs">
<a href="{$site['url']}">{$site['title']}</a> /
<a href="{$site['url']}{$sClroomsUrl}">__Clrooms__</a> /
<span class="active_link">{$sCategName}</span>
</div>
EOJ