Click to See Complete Forum and Search --> : MySQL insert at beginning of table


arc4nis
10-26-2008, 08:30 AM
This seems like a simple question, but google doesnt give any answers.
When using the INSERT command it inserts the row at the end of the table. I need to insert at the beggining of the table so when I use the PHP command mysql_fetch_array it returns the last row that was inserted first.

Any help is appreciated...

arc4nis
10-26-2008, 09:09 AM
In a moment of enlightment I found the solution :D
In the select statement the rows can be ordered with the ORDER BY command
SELECT * FROM generalforum ORDER BY threadid DESC;