Hi Geoff,
Maybe this will work, but the trouble I'm having is more in line with how
the MySQL queries are displayed as a result of repeated regions. The code
below may clarify the problem:
On 2/4/05 3:11 PM, in article
k5********************************@4ax.com,
"Geoff Berrow" <bl******@ckdog.co.uk> wrote:
$s[0]<td>description</td><td>image</td>$e[0]
$s[1]<td>description</td><td>image</td>$e[1]
$s[2]<td>description</td><td>image</td></tr>$e[2]
Should do what we want.
So..
$i++;
if($i>2){$i=0;}
Let me give you some of the code and the query at the bottom.
The display table:
<table width="550" border="2" align="center" cellpadding="0" cellspacing="1"
bordercolor="#333333">
<tr>
<td width="50%">
<div align="center">
<p><?php echo $row_viewall['descrip']; ?> </p>
....
<?php echo $row_viewall['item_name']; ?>" border="0"></a><br>
<?php echo $row_viewall['designer']; ?>
<br>
<?php echo $row_viewall['item']; ?></div></td>
</tr>
</table>
<?php } while ($row_viewall = mysql_fetch_assoc($viewall)); ?>
The query is set up to display info linked to the database row.
The Query:
~~~~~~~~~~~~~~
$maxRows_viewall = 5;
$pageNum_viewall = 0;
if (isset($_GET['pageNum_viewall'])) {
$pageNum_viewall = $_GET['pageNum_viewall'];
}
$startRow_viewall = $pageNum_viewall * $maxRows_viewall;
mysql_select_db($database_jodenonline, $jodenonline);
$query_viewall = "SELECT * FROM `Catalog` WHERE `Catalog`.img_status = '1'
AND `Catalog`.designer Like '%Victorian%' ORDER BY `Catalog`.sold ASC";
$query_limit_viewall = sprintf("%s LIMIT %d, %d", $query_viewall,
$startRow_viewall, $maxRows_viewall);
$viewall = mysql_query($query_limit_viewall, $jodenonline) or
die(mysql_error());
$row_viewall = mysql_fetch_assoc($viewall);
if (isset($_GET['totalRows_viewall'])) {
$totalRows_viewall = $_GET['totalRows_viewall'];
} else {
$all_viewall = mysql_query($query_viewall);
$totalRows_viewall = mysql_num_rows($all_viewall);
}
$totalPages_viewall = ceil($totalRows_viewall/$maxRows_viewall)-1;
$queryString_viewall = "";
if (!empty($HTTP_SERVER_VARS['QUERY_STRING'])) {
$params = explode("&", $HTTP_SERVER_VARS['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_viewall") == false &&
stristr($param, "totalRows_viewall") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_viewall = "&" . implode("&", $newParams);
}
}
$queryString_viewall = sprintf("&totalRows_viewall=%d%s",
$totalRows_viewall, $queryString_viewall);
?>
~~~~~~~~~~~~
Jefferis Peterson, Pres.
Web Design and Marketing
http://www.PetersonSales.com
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----