Incorrect ordering in PHP/MySQL statement

From: Date: Fri, 22 Dec 2000 18:57:18 +0000
Subject: Incorrect ordering in PHP/MySQL statement
Groups: php.general 
Request: Send a blank email to php-general+get-31610@lists.php.net to get a copy of this message
Hi~ I have the following query in a PHP document: SELECT * FROM products WHERE subcat='test' ORDER BY sort; This displays all products in the subcategory test and lists them in order according to the sort column. However, the order is displayed as follows: 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, etc. It should go: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, etc. How can I get it to display the products in the correct order? Thanks, -Ben

« previous php.general (#31610) next »