Jump to content

[SOLVED] Numbers and Order


steveangelis

Recommended Posts

I currently have a list showing off a sequence of numbers coming from a database.  It is pretty straight forward, row 1 has a 1, row 2 has a 2 row 3 has a 3 and so on.  The problem is when it gets to row 10, 10 gets put right below 1 such as this:

 

1

10

11

12

2

3

4

5

 

Does anyone know how to make this so the numbers are in the correct order?

Link to comment
https://forums.phpfreaks.com/topic/173271-solved-numbers-and-order/
Share on other sites

  • 1 month later...

The result is due to what the query operates on. The solution is either to use a correct definition for the column or force the query to treat the values as integers in the query.

 

Using intval() or any other php code would not affect what the query does and would not work.

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.