[SOLVED] Repeat Region DWMX Problem
Posted: Tue Sep 21, 2004 1:00 am
feyd | Please use
But when I add the repeat region, I get the error. Here's the code with the addotion:
I've run into this problem before and I fixed it when I retraced everything, though I don't know how. I guess I need to figure it out now.
I know the variable is being passed and works with URL/GET and FORM/POST. It seems its the DO/WHILE part of DW's repeat region that's making the problem:
Here's the error I get in its entirety:
Any thoughts?
Steve
feyd | Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Hi All,
I know there are a few DW Haters out there, but please bear with me. I'm trying to do the simplest of things. Repeat Region. I am able to display one record w/o problem:Code: Select all
<?php require_once('../../Connections/hungryusaconnection.php'); ?>
<?php
$colname_rsmenu = "1";
if (isset($HTTP_GET_VARS['namefield'])) {
$colname_rsmenu = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['namefield'] : addslashes($HTTP_GET_VARS['namefield']);
}
mysql_select_db($database_hungryusaconnection, $hungryusaconnection);
$query_rsmenu = sprintf("SELECT * FROM menus WHERE item LIKE '%%%s%%' ORDER BY item ASC", $colname_rsmenu);
$rsmenu = mysql_query($query_rsmenu, $hungryusaconnection) or die(mysql_error());
$row_rsmenu = mysql_fetch_assoc($rsmenu);
$totalRows_rsmenu = mysql_num_rows($rsmenu);
mysql_free_result($rsmenu);
?>
<p style="color: #000000"><?php echo $row_rsmenu['item']; ?></p>Code: Select all
<?php require_once('../../Connections/hungryusaconnection.php'); ?>
<?php
$colname_rsmenu = "1";
if (isset($HTTP_GET_VARS['namefield'])) {
$colname_rsmenu = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['namefield'] : addslashes($HTTP_GET_VARS['namefield']);
}
mysql_select_db($database_hungryusaconnection, $hungryusaconnection);
$query_rsmenu = sprintf("SELECT * FROM menus WHERE item LIKE '%%%s%%' ORDER BY item ASC", $colname_rsmenu);
$rsmenu = mysql_query($query_rsmenu, $hungryusaconnection) or die(mysql_error());
$row_rsmenu = mysql_fetch_assoc($rsmenu);
$totalRows_rsmenu = mysql_num_rows($rsmenu);
mysql_free_result($rsmenu);
?>
<?php do { ?>
<p style="color: #000000"><?php echo $row_rsmenu['item']; ?></p>
<?php } while ($row_rsmenu = mysql_fetch_assoc($rsmenu)); ?>I know the variable is being passed and works with URL/GET and FORM/POST. It seems its the DO/WHILE part of DW's repeat region that's making the problem:
Here's the error I get in its entirety:
Code: Select all
Warning: mysql_fetch_assoc(): 4 is not a valid MySQL result resource in /home/virtual/site110/fst/var/www/html/testing/middle/name_results.php on line 16Any thoughts?
Steve
feyd | Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]