Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Mysterious error in repeat region.

LEGEND ,
Feb 08, 2008 Feb 08, 2008
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
TOPICS
Server side applications
252
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 08, 2008 Feb 08, 2008
LATEST
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.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines