array($mode), __FUNCTION__, __LINE__);
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'main_cnt=' . $main_cnt . ',getWhat()=' . getWhat());
- if (!ifSqlHasZeroNums($result_main)) {
+ if (!ifSqlHasZeroNumRows($result_main)) {
// There are menus available, so we simply display them... :)
$GLOBALS['rows'] = '';
while ($content = sqlFetchArray($result_main)) {
), __FUNCTION__, __LINE__);
// Are there some entries?
- if (!ifSqlHasZeroNums($result_sub)) {
+ if (!ifSqlHasZeroNumRows($result_sub)) {
// Init counter
$count = '0';
}
// Some entries are found?
- if (!ifSqlHasZeroNums($result)) {
+ if (!ifSqlHasZeroNumRows($result)) {
$OUT = '';
while ($content = sqlFetchArray($result)) {
$OUT .= ' <option value="' . $content['value'] . '"';
$ret = (!ifSqlHasZeroAffectedRows());
} else {
// Check found rows
- $ret = (!ifSqlHasZeroNums($result));
+ $ret = (!ifSqlHasZeroNumRows($result));
}
// Free memory
// Is the category id set?
if (!isValidId($cid)) {
// No category
- $data['cat'] = '{--_CATEGORY_NONE--}';
- } elseif (isValidId($cid)) {
- // Lookup the category in database
- $result = sqlQueryEscaped('SELECT `cat` FROM `{?_MYSQL_PREFIX?}_cats` WHERE `id`=%s LIMIT 1',
- array(bigintval($cid)), __FUNCTION__, __LINE__);
- if (sqlNumRows($result) == 1) {
- // Category found... :-)
- $data = sqlFetchArray($result);
- } // END - if
+ return '{--_CATEGORY_NONE--}';
+ } // END - if
- // Free result
- sqlFreeResult($result);
+ // Lookup the category in database
+ $result = sqlQueryEscaped('SELECT `cat` FROM `{?_MYSQL_PREFIX?}_cats` WHERE `id`=%s LIMIT 1',
+ array(bigintval($cid)), __FUNCTION__, __LINE__);
+
+ if (sqlNumRows($result) == 1) {
+ // Category found... :-)
+ $data = sqlFetchArray($result);
} // END - if
+ // Free result
+ sqlFreeResult($result);
+
// Return result
return $data['cat'];
}
), __FUNCTION__, __LINE__);
// Was it *not* found?
- if (ifSqlHasZeroNums($result)) {
+ if (ifSqlHasZeroNumRows($result)) {
// So we add one!
sqlQueryEscaped("INSERT INTO `{?_MYSQL_PREFIX?}_user_links` (`%s`, `userid`, `link_type`) VALUES (%s,%s,'%s')",
array(
), __FUNCTION__, __LINE__);
// Is there rows?
- if (!ifSqlHasZeroNums($result)) {
+ if (!ifSqlHasZeroNumRows($result)) {
// Found data so add them as OPTION lines
while ($content = sqlFetchArray($result)) {
// Is extra set?
__FUNCTION__, __LINE__);
// Are there entries?
- if (!ifSqlHasZeroNums($result)) {
+ if (!ifSqlHasZeroNumRows($result)) {
// ... and begin loading stuff
while ($content = sqlFetchArray($result)) {
// Transfer some data
);
// Are there entries?
- if (!ifSqlHasZeroNums($result)) {
+ if (!ifSqlHasZeroNumRows($result)) {
// Now load all userids for one big query!
$userids = array();
while ($data = sqlFetchArray($result)) {
$result = sqlQuery($sql, __FUNCTION__, __LINE__);
// Are there some URLs left?
- if (!ifSqlHasZeroNums($result)) {
+ if (!ifSqlHasZeroNumRows($result)) {
// List all URLs
$OUT = '';
while ($row = sqlFetchArray($result)) {
$rows = array();
// Are there entries?
- if (!ifSqlHasZeroNums($result)) {
+ if (!ifSqlHasZeroNumRows($result)) {
// Load all entries
while ($row = sqlFetchArray($result)) {
array_push($rows, $row);