if (empty($data['title'])) {
// No name found
$data['title'] = sprintf("%s (%s)", getMessage('LANG_UNKNOWN_MODULE'), $module);
- if (SQL_NUMROWS($result) == '0') {
+ if ((is_resource($result)) && (SQL_HASZERONUMS($result))) {
// Add module to database
$dummy = checkModulePermissions($module);
} // END - if
array($rowName, $stats_id, bigintval($userid), $type), __FUNCTION__, __LINE__);
// Was it *not* found?
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// So we add one!
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_links` (`%s`, `userid`, `link_type`) VALUES ('%s','%s','%s')",
array($rowName, $stats_id, bigintval($userid), $type), __FUNCTION__, __LINE__);