arny660 Posted July 5, 2011 Share Posted July 5, 2011 I cant seem to find the download for chapter 6. I have the downloads for most of the other chapters, but not this one. Im looking to populate the database. Can anyone help please? Many thanks. Link to comment Share on other sites More sharing options...
arny660 Posted July 5, 2011 Author Share Posted July 5, 2011 I have just found the answer. Link to comment Share on other sites More sharing options...
arny660 Posted July 5, 2011 Author Share Posted July 5, 2011 Another question, sorry! I`m working on Chapter 6, and I am new to MySQL, so please bear with me. I thought I had got the hang of the parent_id concept but after I had copied and pasted the script, I am even more confused. I thought that if, say, users were replying to the fourth message on the database, then the parent_id for any replies to that particular message would be 4 - i.e. the parent_id stores the message_id to which the new message is a reply. The script that I downlaoded doesn`t follow this. Have I picked this up wrong? Sorry if this seem like a dumb question. Many thanks, Arny Link to comment Share on other sites More sharing options...
Paul Posted July 6, 2011 Share Posted July 6, 2011 Arny, Hi. This is my first attempt at answering a question so please take what I'm about to offer with a huge ladle of salt. As far as I understood it the parent_id is the id of the original message not the latest message. The idea being that it's a way to track the 'list' of messages that make up a single post. See the first column on page 168 (Creating the database). As an aside, I notice that below you say that you cut and paste the code. From my very recent experience of working through the book i had the time to type the code from scratch. I know it sounds long winded but I found it a fantastic way to start remembering and becoming more familiar with the syntax. Hope this helps. Cheers Paul Link to comment Share on other sites More sharing options...
arny660 Posted July 6, 2011 Author Share Posted July 6, 2011 Thanks a lot, Paul. That has helped to explain it. I agree with you too that it's a good idea to type out the code. I think I will do that from now on. Thanks again. Arny Link to comment Share on other sites More sharing options...
Recommended Posts