Jump to content


drop down with ascending numbering

drop down

  • Please log in to reply
2 replies to this topic

#1 Jack Magdalene

Jack Magdalene

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 23 March 2013 - 01:06 PM

Hi Everyone,

 

I have a problem with the order of items in a drop-down list. My database table is setup with sequential numbering, both ID and the select items. But when you select the drop-down list, the items are mixed up. Please see the attached screen shot.

 

I would like to see the following:

 

Count:

1

2

3

4

5

etc.

 

Can someone tell me how to fix this or point me in the right direction?

 

Thanks!

Jack

Attached Thumbnails

  • drop-down-numbering.png


#2 likhon3k

likhon3k

    Advanced Member

  • Members
  • PipPipPip
  • 56 posts

Posted 24 March 2013 - 03:28 AM

Hi Everyone,

 

I have a problem with the order of items in a drop-down list. My database table is setup with sequential numbering, both ID and the select items. But when you select the drop-down list, the items are mixed up. Please see the attached screen shot.

 

- You can't set ascending or descending order for integer value. it will take 1, 10,11, 2 this way.

 

You can solve this problem by taking your id as varchar format.



#3 Jack Magdalene

Jack Magdalene

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 24 March 2013 - 01:34 PM

Hi likhon3k,

 

Thank you for the help. I'll make the suggested changes right away.

 

I changed the table to varchar as primary key and removed the auto_increment but when I select the drop down menu it's still showing the same mixed up sequence (0,1,10,11,12...), what I want is: 0,1,2,3,4,5...

 

It must be PHP that's rendering the numbers non-sequential. Any other thoughts?

 

Jack







Also tagged with one or more of these keywords: drop down

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users