1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

ASP Syntax to do a comparison

Discussion in 'C#' started by chame, Apr 25, 2008.

  1. #1
    I haven't a clue how to even begin to do this, but

    If I want to pull data from one column in a database but to distinguish the difference of each item that have different ID # I wanted to write some code that will first group all the "1s" together then move to all the "2s" etc..

    I tried writing something, but not sure if its even correct well it's not because it doesn't work:
    SEMrush
    if layerNumber = 1 then			  
    			 category = objrs("CATEGORY_NAME")
    			 else if layerNumber >=1 then
    			  	objRS.MoveNext 
    				 category = objrs("CATEGORY_NAME")
    			  else 
    			end if 
    
    Code (markup):
    Help Please??
     
    chame, Apr 25, 2008 IP
    SEMrush
  2. dgxshiny

    dgxshiny Greenhorn

    Messages:
    65
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    23
    #2
    I am not sure if I understand correctly but it seems to me that in your query you can just ORDER BY layerNumber. Tthen all the 1s will be first, then the 2s then the 3s,etc.
     
    dgxshiny, Apr 25, 2008 IP
  3. saurabhj

    saurabhj Banned

    Messages:
    3,461
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Your code is looking very horrible :D .. I can't able to understand
     
    saurabhj, Apr 25, 2008 IP
  4. chame

    chame Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    well hence the reason I'm asking for help in writing the code.

    Thanks!
     
    chame, Apr 28, 2008 IP