Skip to main content
Known Participant
February 29, 2012
Question

Problems with filtered recordset

  • February 29, 2012
  • 1 reply
  • 1756 views

I've been having so issues when filtering my recordsets... I have a recordset that is filtered by a URL Variable and displays prroduct information to a customer. I have added "dynamic text" from the recordset into a repeat region. The info dispalyed are things like product name, price, description etc... for some reason non of my dynmaic text will display. If I remove the filter it will display the first row of the recordset but thats it. Any ideas on what might be going on? Thanks so much for any help.

This topic has been closed for replies.

1 reply

Participating Frequently
February 29, 2012

Code?

Known Participant
February 29, 2012

here is my Recordset Query....

$colname_models = "-1";

if (isset($_GET['catid'])) {

  $colname_models = $_GET['catid'];

}

mysql_select_db($database_Models, $Models);

$query_models = sprintf("SELECT * FROM models WHERE catid = %s", GetSQLValueString($colname_models, "int"));

$models = mysql_query($query_models, $Models) or die(mysql_error());

$row_models = mysql_fetch_assoc($models);

$totalRows_models = mysql_num_rows($models);$colname_models = "-1";

here is the rest....

<body onorientationchange="updateOrientation();">

<div id="page_wrapper">

      

            <div id="content_left">

                  <div id="banner"><img src="images/iPad-Banner.png" width="1024" height="151" border="0" usemap="#Map" />

              <map name="Map" id="Map">

                <area shape="rect" coords="20,17,202,132" href="index.php" />

              </map>

                  </div>

            <div id="menu"><img src="images/iPad-menu-bar.png" width="1024" height="51" /></div>

            <div id="body">

              <div id="models">

                <div id="title"><?php echo $row_category['category']; ?></div>

                <div id="record">

                  <?php do { ?>

                    <div id="trailer">

                      <div id="thumbnail"><img src="<?php echo $row_models['thumbnail']; ?>" width="90" height="90" /></div>

                      <div id="name"><?php echo $row_models['model']; ?></div>

                      <div id="desc"><?php echo $row_models['shortdesc']; ?></div>

                    </div>

                    <?php } while ($row_models = mysql_fetch_assoc($models)); ?>

                </div>

              </div>

            </div>

            <div id="footer"><img src="images/iPad-Footer.png" width="1024" height="51" /></div>

</div>

 

        <div id="content_right">

                              <div id="banner"><img src="images/iPad-Banner.png" width="1024" height="151" border="0" usemap="#Map2" />

              <map name="Map2" id="Map2">

                <area shape="rect" coords="24,15,200,133" href="index.php" />

              </map>

  </div>

            <div id="menu"><img src="images/iPad-menu-bar.png" width="1024" height="51" /></div>

            <div id="body">

              <div id="models">

                <div id="title"><?php echo $row_category['category']; ?></div>

                <div id="record">

                  <div id="trailer">

                    <div id="thumbnail"><img src="<?php echo $row_models['thumbnail']; ?>" width="90" height="90" /></div>

                    <div id="name"><?php echo $row_models['model']; ?></div>

                    <div id="desc"><?php echo $row_models['shortdesc']; ?></div>

                  </div>

                </div>

              </div>

          </div>

          <div id="footer"><img src="images/iPad-Footer.png" width="1024" height="51" /></div>

                    </div>

 

        <div id="content_normal">

                              <div id="pbanner"><img src="images/iPad-Banner.png" width="768" height="113" border="0" usemap="#Map3" />

              <map name="Map3" id="Map3">

                <area shape="rect" coords="20,17,152,98" href="index.php" />

              </map>

  </div>

            <div id="pmenu"><img src="images/iPad-menu-bar.png" width="768" height="38" /></div>

            <div id="pbody">

              <div id="pmodels">

                <div id="ptitle"><?php echo $row_category['category']; ?></div>

                <div id="precord">

                  <div id="ptrailer">

                    <div id="pthumbnail"><img src="<?php echo $row_models['thumbnail']; ?>" width="90" height="90" /></div>

                    <div id="pname"><?php echo $row_models['model']; ?></div>

                    <div id="pdesc"><?php echo $row_models['shortdesc']; ?></div>

                  </div>

                </div>

              </div>

          </div>

          <div id="pfooter"><img src="images/iPad-Footer.png" width="768" height="38" /></div>

                    </div>

 

        <div id="content_flipped">

                              <div id="pbanner"><img src="images/iPad-Banner.png" width="768" height="113" border="0" usemap="#Map4" />

              <map name="Map4" id="Map4">

                <area shape="rect" coords="17,14,151,100" href="index.php" />

              </map>

                              </div>

            <div id="pmenu"><img src="images/iPad-menu-bar.png" width="768" height="38" /></div>

            <div id="pbody">

              <div id="pmodels">

                <div id="ptitle"><?php echo $row_category['category']; ?></div>

                <div id="precord">

                  <div id="ptrailer">

                    <div id="pthumbnail"><img src="<?php echo $row_models['thumbnail']; ?>" width="90" height="90" /></div>

                    <div id="pname"><?php echo $row_models['model']; ?></div>

                    <div id="pdesc"><?php echo $row_models['shortdesc']; ?></div>

                  </div>

                </div>

              </div>

          </div>

          <div id="pfooter"><img src="images/iPad-Footer.png" width="768" height="38" /></div>

                    </div>

</div>

</body>

</html>

<?php

mysql_free_result($models);

mysql_free_result($category);

?>

There are four of the same thing because this is a mobile version made for an ipad the resizes on orientation change....

Participating Frequently
February 29, 2012

The problem is most likely that the recordset is not returning any values. Can you copy and paste the url including the querystring when this page is accessed?  Also, for every catid in the model table, are there multiple rows?