<?php
if ( isset($_GET['catid']) ) {
$id = $_GET['catid'];
$results = $modx->db->select("link_name,link_url,hitsout,submitter", "modx_links", "category = $id AND validated = '1'", "id", "");
//
// if ( $results == null) and if ( $results == '' ) do not work either.
//
if ( !$results )
$text = 'There are no links at this time. ';
}
return $text;
?>
if ($modx->db->getRecordCount($results) == 0 ) {
$text = 'There are no links at this time. ';
}