diskhub Posted December 12, 2005 Share Posted December 12, 2005 HI, May i ask how do i insert in between entries of the database table by pushing the entries in the middle portion to the bottom? And do u guys suggestion i do keeping the existing id? or modify the id according to it's entry row? Quote Link to comment Share on other sites More sharing options...
fenway Posted December 24, 2005 Share Posted December 24, 2005 Don't EVER worry about the UIDs, or the physical order the table -- if you app "needs" to know about this, then there is something seriously wrong with your DB design. Just run your INSERT statements, and let the storage engine do the rest. Quote Link to comment Share on other sites More sharing options...
yeago Posted December 24, 2005 Share Posted December 24, 2005 Can you explain why you would want to do this? Typically, this defeats the purpose of id's at all. I'll show you: Let's say you have a table 'animals' 0,cat 1,dog 2,rhino you have another table 'pet owners' tim,0 (cat) tim,1 (dog) shelly,2 (rhino) Then you insert an animal into database after cat, lemur! 0,cat 1,lemur 2,dog 3,rhino Now tim owns a cat and a lemur and shelley owns a dog! 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.