Skip to main content
Inspiring
February 8, 2008
Question

Mysterious error in repeat region.

  • February 8, 2008
  • 1 reply
  • 250 views
Hi All,

I'm getting this strange error on my page and I can't figure out why.

> *Warning*: mysql_fetch_assoc(): 9 is not a valid MySQL result resource
> in */Users/brett/vhosts/absite/products.php* on line *132*

Here are lines 130, 131,132, a simple repeat region.

> <?php do { ?>
> <img src="images/product_imgs/thmb/<?php echo
> $row_chooseProducts['image']; ?>" />
> <?php } while ($row_chooseProducts =
> mysql_fetch_assoc($chooseProducts)); ?>

What makes this all the more mysterious is that I took this code
directly from another page where it works perfectly and put it in it's
proper place in the actual page. The other page was a test page without
masthead, navigation, etc. I have compared the two pages using
TextWrangler and the only difference is in the additional elements:
masthead, navigation, etc. So why doesn't it work in this page?

TIA
This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Inspiring
February 8, 2008
Mystery solved.

I had a recordset in my nav.php include file that was causing problems.
As soon as I removed the recordset from the include file, everything
worked fine.

The only reason I had the recordset in the nav file was for testing
purposes, but I forgot to remove it.