phpMysql Q
- Started
- Last post
- 15 Responses
- ********
if i have a bunch of rows in a table, is there any way to rearrange the order they get read?
i have a bunch of them, i don't want to mess with their ID numbers, but i assume there's a way...
- unfittoprint0
yes
but wich order?
- UndoUndo0
if this is for optmisation you need to break apart yr data into different tables are relate them with foreign keys otherwise contruct yr query to only return the info you want. a better explanantion of the problem would help
- ********0
clarification: how can i change the order of the rows in my table?
I want them in order by ID.
- nRIK0
couldnt u do a ORDER BY id DESC; in ur statement
(or is that a little to simple for what youre after?)
- nRIK0
ah just read ur answer.. try the above maybe
- UndoUndo0
ORDER BY like nRIK said. put it at the end of yr query. you can also and LIMIT 50 to limit to 50 results and DESC or ASC [descending or asecending]
- unfittoprint0
as stated before just a simple usage of ORDER BY.
- nRIK0
yep :)
- ********0
I was hoping to be able to change the default order that it shows up in the phpMysql interface, is there a way to do that?
- ********0
thanks guys :)
- ********0
Do you mean phpMyAdmin?
- ********0
haha yeah that's what i meant...still early here :)
- ********0
You can click the row names to sort them...
If you want change the default I guess you could the source - but I wouldn't recommend it.
- unfittoprint0
indeed.
never change the auto-incremented values [usually the IDs] or you'll be in a world of trouble.
- nRIK0
yep, but i dont understand why you would want/need to change the default? (just curious)