Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Code?
Copy link to clipboard
Copied
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....
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
the url is: www.charmactrailers.com/mobile/iPad/trailers.php?catid=2
Yes for this selection there are 14 rows.... When I test the Query inside dreamweaver in the recordset "box" it returns the values...
I had a similar problem displaying Session variables as well one a user is logged in or filtering by a seesion variable...
Copy link to clipboard
Copied
OK, if you check the page source you'll see that it is returning data for "?php echo $row_models['model']; ?" so check to make sure you have the column names spelled correctly for the other columns. Also, you have duplicate id's in your code, which is invalid syntax. This is not related to your current problem, but should be fixed. You should use classes instead.
Copy link to clipboard
Copied
From what I can tell everything is spelled correctly. Somethign that might help... i copied the url into my computers browser and Viewed the source and it is showing the repeated region in the correct amount of records for that catid (14 rows) So the the recordset is returning the correct data it is jsut not being displayed on the webpage...
Copy link to clipboard
Copied
Yes, that's what I said. It appears that it is displaying the correct data for the column 'model', but not for 'thumbnail' and 'shortdesc'. What are the datatypes for all 3 columns?
Copy link to clipboard
Copied
However the "model" is not being dispalyed either. everyhting is blank. They are all varchar...
Copy link to clipboard
Copied
Not sure why you don't see them; I do:
<div id="name">Snow Sport</div>
<div id="name">Elite Snow Sport</div>
<div id="name">Tri Sport</div>
<div id="name">Elite Tri Sport</div>
<div id="name">Stealth Snow Sport</div>
<div id="name">Stealth Tri Sport</div>
<div id="name">Stealth Car Hauler</div>
<div id="name">Endeavor</div>
<div id="name">Legend</div>
<div id="name">Avalanche</div>
<div id="name">Elite Avalanche</div>
<div id="name">Open Aluminum Snowmobile</div>
<div id="name">Open Aluminum ATV</div>
<div id="name">Open Aluminum Car Hauler</div>
Copy link to clipboard
Copied
Now I can see them ion the source, however when I test on the Ipad the whole page is displayed but there is just an empty div section where all the info should be displayed. Does that make sense?
Copy link to clipboard
Copied
The page is not rendering correctly, probably due to html problems. For one, you have an unclosed meta tag you should fix. But this is unrelated to your data problem.
Copy link to clipboard
Copied
Does this happen often? I strictly use dreamweaver for everything and have build some complex things but never had this problem. I have been having a similar problem on another site that will not display filtered recordset data or session variables. Thank you very much for all your help.
Copy link to clipboard
Copied
>Does this happen often?
Not that I know of. It could be related to the actual data. Can you give us an example of what is in those database columns that are not displaying? Do they contain any quotes or special characters?
Copy link to clipboard
Copied
The databeses are jsut filled with text. Names of product models and descriptions. No special characters or anthing. For some reason. No new "filtered" recordset that I make on any of my sites is displaying the text in the browser. Is there some sort of code that is keeping this from dispalying maybe? I jsut can't seem to figure out why it is happening everywhere now. Thanks again for your help.
Copy link to clipboard
Copied
>No new "filtered" recordset that I make on
>any of my sites is displaying the text in the browser.
It's not a browser display problem. Remember, we looked at the rendered source code and the values are not there. You mention "filtered" recordsets. What happens if you remove the filter?
Please execute the following SQL from your SQL admin tool and paste the results:
SELECT * FROM models WHERE catid = 2
Find more inspiration, events, and resources on the new Adobe Community
Explore Now