ming-ming Posted July 7, 2012 Share Posted July 7, 2012 Please give an idea how to do this. I have an assignment in which I need to create a method for storing an ordered list of 2 million books in a database. Example data: Book A(blue)->Book B(red)->Book E(blue)->Book C(red)->Book D(blue) The books need to be queried by color and returned in order. Example: "show all blue books" should return books A,E,D And also books need to be moved often. For example, Book C could be moved before Book B. I just don't know how to start. I'm a rookie in using PHP, please help me :'(. Thank you so much for your time! Quote Link to comment https://forums.phpfreaks.com/topic/265343-please-help-me/ Share on other sites More sharing options...
trq Posted July 7, 2012 Share Posted July 7, 2012 You simply need three database columns. name, colour and sequence. With that in mind, are you still stuck? Quote Link to comment https://forums.phpfreaks.com/topic/265343-please-help-me/#findComment-1359833 Share on other sites More sharing options...
ming-ming Posted July 7, 2012 Author Share Posted July 7, 2012 ^thank you so much for your reply sir! Well, I'm a little stuck when it comes to moving the cars. Quote Link to comment https://forums.phpfreaks.com/topic/265343-please-help-me/#findComment-1359834 Share on other sites More sharing options...
trq Posted July 7, 2012 Share Posted July 7, 2012 Well, that's not exactly something we can help with. Quote Link to comment https://forums.phpfreaks.com/topic/265343-please-help-me/#findComment-1359837 Share on other sites More sharing options...
ming-ming Posted July 7, 2012 Author Share Posted July 7, 2012 I understand. Still, thank you for your time! Quote Link to comment https://forums.phpfreaks.com/topic/265343-please-help-me/#findComment-1359838 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.