Jump to content

Problem sorting using ORDER


kramster

Recommended Posts

Hi all,

 

I have a strange problem.

 

I am using the MySQL query

SELECT * FROM crh_log WHERE logdetix=$detix ORDER BY logix ASC

 

I have this exact query in two scripts, each gives a different result.

 

logix is the primary key to the table.

 

There are two rows that satisfy this query. One script returns the rows on ascending order of logix, the other is the reverse.

 

I've tried ORDER BY different variables and in one script it never makes a difference - it's as if MySQL is ignoring the ORDER by clause.

 

The MySQL code in the code snippets in attached file are identical. The only difference is that logix is displayed in the able in one script and not in the other.

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/287778-problem-sorting-using-order/
Share on other sites

a) you didn't post any code. when posting code in the forum, please use the forum's


bbcode tags (the edit form's <> button).

 

b) you would also need to show us the raw data values in your table (showing the table definition would help too) and what the actual incorrect output is that you are getting from your code.

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.