Professional Web Applications Themes

I want get position in result set(position of product in it's category), where is err - ColdFusion

displayImg2 is a particular Product_ID Code: <cfquery datasource="mysqlcf_lse123polis" name="getData19" > SELECT Product_ID FROM Products WHERE Category_ID=#cat# </cfquery> <cfset n=0> <cfloop query="getData19" startrow="1" endrow="#getData19.recordCount#"> <cfif #getData19.Product_ID# NEQ displayImg2> <cfset n=n+1> </cfif></cfloop> I want get position in result set(position of product in it's category: Products table contains products from many categories), where is error? I get always n=8 .query has total 9 records in the cat....

  1. #1

    Default I want get position in result set(position of product in it's category), where is err

    displayImg2 is a particular Product_ID
    Code:
    <cfquery datasource="mysqlcf_lse123polis" name="getData19" >
    SELECT Product_ID FROM Products WHERE Category_ID=#cat#
    </cfquery>
    <cfset n=0>
    <cfloop query="getData19" startrow="1" endrow="#getData19.recordCount#">
    <cfif #getData19.Product_ID# NEQ displayImg2>
    <cfset n=n+1>
    </cfif></cfloop>
    I want get position in result set(position of product in it's category: Products table contains products from many categories), where is error? I get always n=8 .query has total 9 records in the cat.
    Last edited by lse123; October 22nd at 06:42 PM.
    lse123 is offline Junior Member
    Join Date
    Oct 2010
    Location
    Polis, cyprus
    Posts
    2

  2. #2

    Default Re: I want get position in result set(position of product in it's category), where is

    problem solved: NEQ=>>>LE
    lse123 is offline Junior Member
    Join Date
    Oct 2010
    Location
    Polis, cyprus
    Posts
    2

Similar Threads

  1. get position
    By kruak in forum Macromedia Flash Flashcom
    Replies: 0
    Last Post: December 9th, 10:45 PM
  2. Available Position: ASP.net/VB.net
    By Erich Kolb in forum ASP.NET Data Grid Control
    Replies: 8
    Last Post: March 13th, 11:11 PM
  3. how to position pop-up relatively?
    By mark haynes in forum Macromedia Fireworks
    Replies: 0
    Last Post: July 8th, 02:58 PM
  4. Position of Sun
    By Mike Cook in forum Photography
    Replies: 6
    Last Post: June 28th, 06:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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