why wont my output work

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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 =...
    2. 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...
    3. 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...
    4. 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
    5. 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...
  3. #2

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139