$GID    = NULL;
$sql  = "SELECT * FROM course WHERE gid = '" .$urlkey. "' LIMIT 1";
$rs  = $conn->execute($sql);
if ( $conn->Affected_Rows() ) {
    $GID              = mysql_real_escape_string($rs->fields['GID']);
    $group            = $rs->getrows();
    $sql_count        = "SELECT count(TID) AS total_topics FROM video WHERE channel = '" .$channel. "'";
    $ars              = $conn->execute($sql_count);
    $total            = $ars->fields['total_topics'];
    $pagination       = new Pagination(10);
    $limit            = $pagination->getLimit($total);
    $sql              = "SELECT * FROM video WHERE channel = '" .$channel. "' LIMIT " .$limit;
    $rst              = $conn->execute($sql);
    $topics           = $rst->getrows();
    $pagination_url   = $config['BASE_URL']. '/group/' .$urlkey. '/{#PAGE#}';
    $page_link        = $pagination->getPagination($pagination_url);
    $start_num        = $pagination->getStartItem();
    $end_num          = $pagination->getEndItem();    STemplate::assign('start_num', $start_num);
    STemplate::assign('end_num', $end_num);
    STemplate::assign('page_link', $page_link);
    STemplate::assign('grptps', $topics);
} else
    $err = 'This group does not exist!';我做一个联合查询course表中GID字段 记录为1,然后查询video表channel字段 记录为1 的记录,这样做对吗? 为什么我这样做显示不出来啦~