why are there so many smart-a$$ geeks?

ndee

Lifer
Jul 18, 2000
12,680
1
0
<ndee> hi there, I have a table with 50'000 entries and I wanna order it by a column. How can I do that? I know with SELECT * FROM tbl ORDER BY FIELD, but how can I make that change permanent in the database itself?
<georg_> ndee: databse doesn't sore rows in an order.
<john> BUT BUT WHEN I USE PHPMADMIN !!!
<georg_> muaahhh :)
<Boltsky> alter table tbl order by field;
<Boltsky> but it'll get messed up whenever you insert/delete rows
<ndee> georg_: but when I make a SELECT statement, it always gives me the same order.
<ndee> georg_: so it needs to have an order, no?
<georg_> ndee: When you don't delete or update any row this should be the order from insert
<ndee> georg_: yeah, so it does have an order.
<georg_> ndee: so where is your problem?
<ndee> georg_: ndee: databse doesn't sore rows in an order.
<georg_> yup, this means not in an alphabetical or numerical order

So the thing that Boltsky wrote worked actually.
 

ndee

Lifer
Jul 18, 2000
12,680
1
0
It was an IRC channel :) It would have been ok if they just told me RTFM, which is actually true. Just thought I would ask real quick in an IRC Channel.