FlyingIsFun1217 Posted June 23, 2008 Share Posted June 23, 2008 Hey! For a project I have, table results are returned in what seems to be a FIFO order (as in the first result, row 0, is returned first, and the last row will be returned last), and since I want to have new results returned first, I would like to insert new results into the table 'at the top'. Is there an easy way to do insert operations at row 0? Thanks! FlyingIsFun1217 Quote Link to comment Share on other sites More sharing options...
MadnessRed Posted June 23, 2008 Share Posted June 23, 2008 this is a complete guess but would it be done like this? ALTER TABLE `##table name##` ADD `##new news##` BEFORE `##Whatever is first atm##` ; Quote Link to comment Share on other sites More sharing options...
FlyingIsFun1217 Posted June 23, 2008 Author Share Posted June 23, 2008 Ok, I see how I could go about doing that. I found it easier to just add a 'number' field, set it to auto_increment, and sort descending by it. Thanks for your help! FlyingIsFun1217 Quote Link to comment Share on other sites More sharing options...
MadnessRed Posted June 23, 2008 Share Posted June 23, 2008 like mikelmao is doing. http://www.phpfreaks.com/forums/index.php/topic,203375.0.html Quote Link to comment Share on other sites More sharing options...
FlyingIsFun1217 Posted June 24, 2008 Author Share Posted June 24, 2008 like mikelmao is doing. http://www.phpfreaks.com/forums/index.php/topic,203375.0.html That was quite comical. Either way, I've fixed it. Thanks! FlyingIsFun1217 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.