Ask a Question related to Coldfusion Database Access, Design and Development.
-
JanyerCFML #1
SQL statments that don,t output correctly
Hi, All I am have output differences when I run a CFQUERY. I built the query in
access and when I view the output of the query
in access it looks fine but when I output the query in CF with a group
attribute I get the grouping but I only get one output for each category and I
also get repeated cataegories.
If someone could help me it would be great thanks.
Janyer
JanyerCFML Guest
-
Flash Forms with cfif statments?
Does anyone know how to use the <cfif> and <cfelse> statements with the new flash forms, especially with <cfgridcolumn>? Example: <cfgridcolumn... -
Carriage returns/output not displayed in output.asp
PLEASE DON'T MULTIPOST. PLEASE DON'T POST ATTACHMENTS. PLEASE DON'T DOUBLE-POST. Ray at work -
#25152 [Opn->Bgs]: output buffering functions don't catch "virtual" output
ID: 25152 Updated by: iliaa@php.net Reported By: msarsale at buenosaires dot gov dot ar -Status: Open +Status:... -
Not Exporting Correctly
I created a Menu with two behaviors and when I do preview in Fireworks it works fine. But after I export it, only the first behavior is working. ... -
If...Then statments
Hi, How can I use a If..Then Statment in DataGrid? -
paross1 #2
Re: SQL statments that don,t output correctly
Sorry, my crystal ball is broken, but if you can provide the relevant code, perhaps we could hazard a quess.
Phil :D
paross1 Guest
-
JanyerCFML #3
Re: SQL statments that don,t output correctly
i ATTACHED TO CODE FOR YOU , THANKS A MILLION
<cfquery name="q_menuList" datasource="cafe">
SELECT foodMenu.id, menuCatagory.menuCatagory, foodMenu.menuCategoryId,
menuCatagory.postionId, foodMenu.name, foodMenu.description, foodMenu.price
FROM menuPostion INNER JOIN (menuCatagory INNER JOIN foodMenu ON
menuCatagory.id = foodMenu.menuCategoryId) ON menuPostion.id =
menuCatagory.postionId
ORDER BY menuCatagory.postionId
</cfquery>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Cafe Ibiza</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
location.reload();
}
MM_reloadPage(true);
//-->
</script>
<link href="styler.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-color: #F8F3E7;
}
.style5 {color: #FFFFFF}
-->
</style></head>
<body>
<div align="center">
<table width="774" height="100%" border="0" cellpadding="0" cellspacing="0"
bgcolor="FFFFFF">
<tr>
<td height="226" colspan="2" bgcolor="EEE7C9"><object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
rsion=6,0,29,0" width="779" height="226">
<param name="movie" value="images/header.swf">
<param name="quality" value="high">
<embed src="images/header.swf" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="779" height="226"></embed>
</object></td>
</tr>
<tr>
<td height="3" colspan="2"></td>
</tr>
<tr>
<td height="25" colspan="2" bgcolor="0C2E87"><div align="left"
class="tableHeader style5"> Menu</div></td>
</tr>
<tr>
<td height="3" colspan="2"></td>
</tr>
<tr>
<td width="160" height="100" valign="top" bgcolor="#F2EBD2"><div
align="left">
<table width="160" height="100%" border="0" cellpadding="0"
cellspacing="0" bgcolor="#DDC29F">
<tr>
<td width="160" valign="top"
background="images/background-ibiza.jpg"><p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</p></td>
</tr>
</table>
</div></td>
<td width="619" height="100%" valign="top" bgcolor="#F2EBD2">
<br>
<table width="95%" border="0" align="center" cellpadding="4"
cellspacing="4">
<cfoutput query="q_menuList" group="menuCategoryId">
<tr valign="top">
<td colspan="3"><blockquote class="tableHeader">
<div align="left">#q_menuList.menuCatagory#</div>
</blockquote></td>
</tr>
<tr valign="top">
<td width="150"><div align="left"
class="style2"><strong>#q_menuList.name#</strong></div></td>
<td><div align="left"
class="style2">#q_menuList.description#</div></td>
<td><div align="left" class="requiredAstres">
<div align="right">#q_menuList.price#</div>
</div></td>
</tr>
<tr valign="top">
<td colspan="3"><br><br></td>
</tr>
</cfoutput>
</table>
<p> </p>
</td>
</tr>
<tr>
<td colspan="2" valign="top" bgcolor="A4A39F"><object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
rsion=6,0,29,0" width="779" height="50">
<param name="movie" value="images/banner.swf">
<param name="quality" value="high">
<embed src="images/banner.swf" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="779" height="50"></embed>
</object></td>
</tr>
</table>
</div>
</body>
</html>
JanyerCFML Guest
-
paross1 #4
Re: SQL statments that don,t output correctly
I'm not sure exactly how you want the results grouped, but you can nest
CFOUTPUT tags with group attributes. In other words, you might order by more
than one field in your query, then your first CFOUTPUT would contain the query
and group of categoryID, and then have other nested CFOUTPUT tags with other
group attributes to refine your output display.
Phil
paross1 Guest
-
OldCFer #5
Re: SQL statments that don,t output correctly
In addition, the group column in cfoutput has to be the same as the "order by" column in
your query. You can't order by one column and group by another.
OldCFer Guest



Reply With Quote

