Repeat Region Update problem
i am testing Design Extender and following this video watch?v=kbplAlzNexI there is a step to add a Repeat Region i did this but page only show last blog title and not all blog titles as explain video in minute 7:14 this is my test code, any idea??
<?php require_once('Connections/PowerCMSConnection.php'); ?>
<?php require_once("WA_CMS/WA_CMS.php"); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$maxRows_BlogRS = 10;
$pageNum_BlogRS = 0;
if (isset($_GET['pageNum_BlogRS'])) {
$pageNum_BlogRS = $_GET['pageNum_BlogRS'];
}
$startRow_BlogRS = $pageNum_BlogRS * $maxRows_BlogRS;
mysql_select_db($database_PowerCMSConnection, $PowerCMSConnection);
$query_BlogRS = "SELECT C2.ContentGroup, C2.ContentPageSetOrder FROM pcms2_contents AS C1 LEFT OUTER JOIN pcms2_contents AS C2 ON C2.ContentPagesetParentID = C1.ContentID WHERE C1.ContentGroup = 'BlogPosts' AND C2.ContentPageSetOrder IS NOT NULL GROUP BY C2.ContentPageSetOrder ORDER BY C2.ContentPageSetOrder DESC";
$query_limit_BlogRS = sprintf("%s LIMIT %d, %d", $query_BlogRS, $startRow_BlogRS, $maxRows_BlogRS);
$BlogRS = mysql_query($query_limit_BlogRS, $PowerCMSConnection) or die(mysql_error());
$row_BlogRS = mysql_fetch_assoc($BlogRS);
if (isset($_GET['totalRows_BlogRS'])) {
$totalRows_BlogRS = $_GET['totalRows_BlogRS'];
} else {
$all_BlogRS = mysql_query($query_BlogRS);
$totalRows_BlogRS = mysql_num_rows($all_BlogRS);
}
$totalPages_BlogRS = ceil($totalRows_BlogRS/$maxRows_BlogRS)-1;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php do { ?>
<?php
include('C:/xampp/htdocs/WA_CMS/addtosite.php');
echo WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'BlogPost', 'BlogPostTitle', false, $row_BlogRS['ContentPageSetOrder']);
?>
<?php } while ($row_BlogRS = mysql_fetch_assoc($BlogRS)); ?>
</body>
</html>
<?php
mysql_free_result($BlogRS);
?>