Database Design - Round 3
OK, so it’s been a while, but my novice PHP programming skills have been moving (slowly) along. For my initial foray into database web development, I’ve chosen to build a dynamic wish list. Input from Patrick helped me set up the core tables in MySQL and SAMS Teach Yourself PHP, MySQL and Apache helped with the rest.
Setting up the tables via MyPHPAdmin was a snap, and creating a mechanism to add new items to the wish list was actually pretty easy. My big struggle has been getting the display mechanism to work.
Since I use a bridge table to match items to people I began by selecting a person’s list to view and simply outputting the item IDs. Fairly easy to do and it work more or less from the get go. Next up was taking the item ID from the bridge table and referencing the items table to get the rest of the information. For some reason this failed to work for a long long time.
The kicker: I’m not really sure why it now works. I set up the original loops (match person to item IDs in bridge table; match item ID in item table, extract data) and they failed to produce. I tried modifying and moving and everything elseing I could think of to no avail. Then I reverted to what was, as far as I could remember, the original nested loops. It now works fine.
Arg. Don’t get me wrong, I’m glad it works. I just really want to know what is different now from what I originally wrote. It doesn’t help that I worked on this a few minutes at a time spread out across two months and that I worked from one file — modifying, commenting in and out, and deleting along the way. (I know. I really should have kept separate iterative versions.)
At any rate, the main functionality works. Select a person and the corresponding list appears. Up next: figure out how to organize with in each list by category and make the display pretty.
The URI to TrackBack this entry is: http://www.tjameswhite.com/blog/archives/2005/10/database-design-round-3/trackback/
Comments »
No comments yet.
RSS feed for comments on this post.
Leave a comment
Comments are moderated, if you've commented before, it will show up automatically. If not, it will be submitted for approval. Please leave a name and e-mail address. They are for my verification only and do not appear online in any way shape or form. Without a name and/or and email address I don't know who you are your comment will not be approved.
Line and paragraph breaks automatic, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>