help with query code

Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default help with query code

    Debugging info:
    pdfselectlist (Datasource=prereg, Time=20ms, Records=3) in
    D:\htdocs\examples\mycfs\formprocess.cfm @ 14:33:32.032

    SELECT *
    from pdf_status
    WHERE ID IN (012,7,5)

    Record count says 3, but I get 3 of the same pages inside the new PDF.

    <cfcase value="batch">
    <cfset SelectList = form.selectlist>
    <cfquery datasource="prereg">
    UPDATE pdf_status
    SET print_flag = 'Yes'
    WHERE ID IN (0#SelectList#)
    </cfquery>
    <cfquery datasource="prereg" name="pdfselectlist">
    SELECT *
    from pdf_status
    WHERE ID IN (0#SelectList#)
    </cfquery>
    <cfset status = "Printed">
    <cfset timestampfile = "#DateFormat(Now(), "mm-dd-yyyy")#"&"#TimeFormat(Now(),
    "hh-mm-ss")#">
    <cfset filename = "#timestampfile#.pdf">
    <cf_pdf file="batch\#filename#">
    <cfoutput query="pdfSelectlist">
    <cf_pdf_info file="upload\#pdfselectlist.pdf_name#">
    <cfset index=1>
    <cfloop query="request.PDFInfo">
    <cf_pdf_page width="#width#" height="#height#">
    <cf_pdf_read file="upload\#pdfselectlist.pdf_name#" page="#index#" />

    </cf_pdf_page>
    <cfset index = index + 1>
    </cfloop>
    </cfoutput>
    </cf_pdf>
    <!---<cflocation url="formmanage.cfm?status=Printed">--->
    </cfcase>

    chriskeeler2 Guest

  2. Similar Questions and Discussions

    1. Zip code radius query
      I found this query in another post and since it appeared to be exactly what i needed, i copied it. thank you to the author. My problem is that...
    2. Query of Queries in CF7 crashes code from CF5
      If anyone has a suggestion to this question, I would be most appreciative. In CF5, I was using a query to show current logged in users within our...
    3. Query return code question
      All... I'm having problems figuring out what pg_query() really returns when there is an error. The documentation says it returns "FALSE",...
    4. how to pass an access DB query onto *next* page? trouble with *next* and *previous* querystring code
      Don;t see any sign of any paging code is your snippets normally take this form Set rso = Server.CreateObject("ADODB.Recordset") rso.PageSize =...
    5. diff between query and sql code?
      in the example following here, it seems to be invoking the 'yourQuery' but the sql code is doing that same thing only based on an index lookup....
  3. #2

    Default Re: help with query code

    Solved it.
    chriskeeler2 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