Hello all, I've defined an index over 3 columns called "cprgpt" in table "country1". The columns in question being "camp", "region" and "postal". The $wherevar has the dynamic generated WHERE statement. [code]$query = "SELECT * FROM country1 $wherevar ORDER BY camp, region, postal LIMIT $offset, $limit"; [/code] The output of the SELECT statement provides the data looked for, the problem is that it's only sorted by camp, not followed by the region and then by postal codes. What could be the problem here? PS: There is no other index that has "camp" and first key. The primary key index for the table is on another column (campid). I've also read the following info: [url=http://dev.mysql.com/doc/refman/4.1/en/order-by-optimization.html]http://dev.mysql.com/doc/refman/4.1/en/order-by-optimization.html[/url]