Jump to content

sorting names by a special way


solarisuser

Recommended Posts

Hi All,

 

I have records named "Entry-1", "Entry-2", .... "Entry-10", "Entry-11", etc...

 

When I list them using:

while ($row = mysql_fetch_array($result, MYSQL_BOTH))
     {
      echo "$row[entry]";
      }

 

I get ..

Entry-1

Entry-10

Entry-11

Entry-12

Entry-13

Entry-14

Entry-2

Entry-3

Entry-4

Entry-5

..

Entry-9

 

 

Is there a way to deal with my situation so that Entry-10 and on come after Entry-9?

I would not mind modifying my MySQL statement if thats what it takes.

 

BTW - I can't change Entry-1 to Entry-01 in the DB.

 

Thanks in advance!

 

Link to comment
https://forums.phpfreaks.com/topic/53809-sorting-names-by-a-special-way/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.