Copy link to clipboard
Copied
I'm having a problem for the last 2 days that I can't seem to solve. In the picture below you'll see I used Repeat Region for "bigTitle". When I do this, the contents for description won't display. As a matter a fact, ANY dynamic text that goes under a repeat region won display. However, If I instead used repeat region on "description", both "bigTitle" and "bar" will display content just fine.
There seems to be a problem having dynamic text below the repeat region and not above. HELP! Thanks in advance.
Copy link to clipboard
Copied
The answer is in the code. Screen shots don't tell anything.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I think I figured out what the problem is but not the solution. Here's the code(all of this is generated by DW):
<?php do { ?>
<?php echo $row_rsAbout['bar']; ?>
<?php } while ($row_rsAbout = mysql_fetch_assoc($rsAbout)); ?>
<?php echo $row_rsAbout['bigTitle']; ?>
<?php echo $row_rsAbout['description']; ?>
</body>
</html>
<?php
mysql_free_result($rsAbout);
?>
I'm using a repeat region on 'bar'. Below that is 'bigTitle' and 'description'. When you run the code it seems that after the browser runs thru the do..while section it stop running the rest of the queries. How can I fix this?
Copy link to clipboard
Copied
>When you run the code it seems that after the browser
>runs thru the do..while section it stop running the rest of the queries.
First of all, to be clear, the browser isn't running any of this code. All server side code is run on the server - only the html is sent to the browser. The problem is that your title and description are outside the loop. Just put them inside and they will display
<?php do { ?>
<?php echo $row_rsAbout['bar']; ?>
<?php echo $row_rsAbout['bigTitle']; ?>
<?php echo $row_rsAbout['description']; ?>
<?php } while ($row_rsAbout = mysql_fetch_assoc($rsAbout)); ?>
</body>
</html>
<?php
mysql_free_result($rsAbout);
?>
If this doesn't produce the results you want, then you need to tell us what results you do want.
Copy link to clipboard
Copied
I figured out that problem and solved it. Bregent, Thanks for ALL your help. What I wrote wasn't very decriptive. What I was looking to do was only repeat 'bar' not the rest. The other 2 ('bigTitle' and 'description') should only display the first record.
I had done this before but forgot the ONE really important thing. When you create a new recordset and intend on using Repeat Region, you need to create a another recordset with a different name (still using the same table). Soon as I did this it worked exactly as I intended. Thanks again.