SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2012
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Php and Mysql Novice to Ninja query

    I have been following the book of sitepoint php and mysql novice to ninja , implementing all examples , everything was running smooth, until chapter 7, final topic managing jokes , where the author states that the database example in the chapter CMS was not designed to support add jokes and delete jokes operation. What is bugging me is, why is it not suitable for these operations, it seems normalized with no database anomalies.

    Jokes
    Id
    Joketext
    Jokedate
    Authorid

    Jokecategories
    Jokeid
    Categoryid

    Categories
    Id
    Name

    Author
    Id
    Name
    Email

    Any help and reply would be much appreciated

    Thanks,
    T.

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,501
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    No idea. I don't have the book with me, so I can't check it. But doesn't the author explain why it doesn't support adding and deleting jokes? Or continue with the modifications to the DB so it does support adding and deleting? Or maybe he wasn't talking about the DB design, but about the PHP code?

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2012
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by guido2004 View Post
    No idea. I don't have the book with me, so I can't check it. But doesn't the author explain why it doesn't support adding and deleting jokes? Or continue with the modifications to the DB so it does support adding and deleting? Or maybe he wasn't talking about the DB design, but about the PHP code?
    Thanks for the help , once you confirmed there is nothing wrong with the database, I skimmed through the later chapters to find the answer...The author was talking about website security in general , as its not secure to allow just anybody to delete and add jokes to your database without an authorization mechanism

  4. #4
    SitePoint Member
    Join Date
    Sep 2012
    Location
    Dhaka, Bangladesh
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Because now your database has a junction table (lookup table) named "Jokecategories". And he wasn't talking about the CMS you created in chapter 7. The add and delete options of your CMS should work just fine. He was talking about the code archive, where he added a folder named "joke" (chapter7) and removed those two features from the joke list page. Because it's the same joke list page that he created in chapter 4 (and modified a little in chapter 5 and 6).

  5. #5
    SitePoint Enthusiast
    Join Date
    Sep 2012
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ayonkhan View Post
    Because now your database has a junction table (lookup table) named "Jokecategories". And he wasn't talking about the CMS you created in chapter 7. The add and delete options of your CMS should work just fine. He was talking about the code archive, where he added a folder named "joke" (chapter7) and removed those two features from the joke list page. Because it's the same joke list page that he created in chapter 4 (and modified a little in chapter 5 and 6).
    Thanks for Clarification , and also for the link


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •