The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 5 of 5

Thread: sql questions, problem with select *

  1. #1
    lunatic's Avatar
    9,895
    posts
    "I feel like I'm taking crazy pills!"

    sql questions, problem with select *

    Hi all

    I am using coldfusion to pass a URL variable in a link:
    Code:
    <a href="docDetail.cfm?Job_Number=<cfoutput>#url.RecordID#</cfoutput>">View documents for this record</a>
    I know it is being passed correctly because it shows up in the address bar of the linked page called docDetail.

    On the docDetail page is my sql query:
    Code:
    <cfquery name="q_docDetails" datasource="PLOG">
    SELECT *
    FROM data_admin.PlogDocs
    WHERE Job_Number = '#URL.Job_Number#'
    ORDER BY DocName DESC 
    </cfquery>
    The problem is that it is only displaying one record - the last one - for any given job number. I may have several different documents that all have the same job number but only the last one is being displayed. I am simply using cfoutput to display them in a table.

    Any ideas?

    Thanks!
    "i walk in stride with people much taller than me and partly it's the boots but mostly it's my chi and i'm becoming transfixed with nature and my part in it which i believe just signifies i'm finally waking up "


  2. #2
    lunatic's Avatar
    9,895
    posts
    "I feel like I'm taking crazy pills!"
    Okay so now I'm thinking it's an html problem. I have another page that displays everything in the table. It works great. I copied the same exact code but changed the query to output the records from a different table. Once again only the last record shows! WHY?!

    I have this nifty sort function on each column. When I click on it it sorts the records based on that column. When I click it again it does a reverse sort. On this problem page of mine that only displays the last record - when I click on the column name it does the reverse sort and only displays the first record?

    Can anyone think of why table is only showing one record?

    "i walk in stride with people much taller than me and partly it's the boots but mostly it's my chi and i'm becoming transfixed with nature and my part in it which i believe just signifies i'm finally waking up "


  3. #3
    lunatic's Avatar
    9,895
    posts
    "I feel like I'm taking crazy pills!"
    okay never mind, I'm an idiot

    I was doing <cfoutput> and need to do <cfoutput query="myquery">

    The sad thing is I think I've done this before!

    thanks anyway
    "i walk in stride with people much taller than me and partly it's the boots but mostly it's my chi and i'm becoming transfixed with nature and my part in it which i believe just signifies i'm finally waking up "


  4. #4
    awe shucks i was too late

  5. #5
    lunatic's Avatar
    9,895
    posts
    "I feel like I'm taking crazy pills!"
    lol, I bet you could have told me what my problem was too!
    "i walk in stride with people much taller than me and partly it's the boots but mostly it's my chi and i'm becoming transfixed with nature and my part in it which i believe just signifies i'm finally waking up "


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012