Ask a Question related to Coldfusion Database Access, Design and Development.
-
cjs35816 #1
why wont my output work
<cfquery name="message" datasource="#Request.Site.DataSource#">
SELECT n.message, p.pagename
from noticetext n, pages p
WHERE lower(trim(p.pagename)) = <CFQUERYPARAM cfsqltype="cf_sql_string"
value="lower(trim(#attributes.page#))">
AND p.pageid = n.pageid
</cfquery>
<cfoutput query="message">
<div id="sitenotice">
Notice Board: #message.message# #attributes.page#
</div>
</cfoutput>
A few odd things I have run into if I don't leave the query="message" in the
output, 2 of the 5 pages get the sitenotice. I am using oracle for my database
here is a print out of what is in the tables.
SQL> desc noticetext
Name Null? Type
----------------------------------------- --------
----------------------------
PAGEID NOT NULL NUMBER
MESSAGE VARCHAR2(1000)
SQL> desc pages
Name Null? Type
----------------------------------------- --------
----------------------------
PAGEID NOT NULL NUMBER
PAGENAME VARCHAR2(55)
SQL> select * from pages;
PAGEID PAGENAME
---------- -------------------------------------------------------
100 home
101 selectclass
102 selectfacilitytype
103 facilitytypeview
104 login
105 selectarea
106 uspsareafacilities
107 uspsfacility
8 rows selected.
SQL> select * from noticetext;
PAGEID
----------
MESSAGE
--------------------------------------------------------------------------------
100
Now is the time for all good men to come to the aid of their party
104
The quick brown fox jumped over the lazy dog
105
To do is to be, Socrates
PAGEID
----------
MESSAGE
--------------------------------------------------------------------------------
106
To be is to do, Aristotle
107
Oo be do be do, Sinatra
cjs35816 Guest
-
system function wont redirect output
hey, in my program im just trying to redirect the commands output but i get the error: sh: line 1: 1: command not found code: $return =... -
Wont Work
Every time I go to Youtube or photobucket yo watch something, it says you need at least flash player 8 or whatever. And I click the link that takes... -
SQL wont work
Can anyone suggest why this SQL wont work? Someone has suggested that I have a few " in the wrong place. I am missing the basic understanding... -
Can anyone tell me why this wont work
Dear Stephen on stopMovie repeat with n in the windowlist -- forget n -- use this forget the windowlist end repeat end -
Can anyone tell me why this wont work??
I am trying to check and see if a field is posted or not, if not posted then assign $location which is a session variable to $location_other. If... -
philh #2
Re: why wont my output work
How about a printout of the query results? I'd base the where condition on the page ID, not the page name.
philh Guest



Reply With Quote

