Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- How do I get MySQL to NOT sort my resultset?
March 12, 2006, 3:58 pm
rate this thread
The following query works, but MySQL sorts the results set:
SELECT STRINGTEXT FROM WEBSTRINGS WHERE GUI=0 AND LANGID='GB' AND TOKENID IN
This means that when I grab this in my recordset the data for TOKENID 312 is
at the end rather than being the first one, eg
I expected my resultset to come back in the following order of requests:
but it comes back as:
Is there anyway to get MySQL to not do this for this query? I really need
them to come back as is.
Re: How do I get MySQL to NOT sort my resultset?
One thing about SQL and databases - you do not know what order the data
is going to be returned - unless you specifically order it (ORDER BY)
but then you only get ASC or DESC.
So, your only option would be to read this into an array and select the
last member of the array first, then process the rest - and depending on
your programming language and your skill as a programmer, this could be
simple or quite challenging.
order by tokenid asc;
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum