For internal use at the company I work for, I have created a Top 25 Products Sold list. The SQL Query is set to select the 25 products with the highest number sold. The query is told to order the results by the number sold, and in descending order.
Unfortunately, when I display the results of the query, for some reason the number 8 is considered to be greated than 50, for example. So when I display the Top 25 products, a product which has sold 8 is listed before a product which has sold 50, or 79, etc.
What it looks like it is doing, is sorting only by the first number in the num_sold field in the database, so the first digit in the number is the only one considered.
Does anyone have any idea what the problem is?
Thanks very much.