Wrox Programmer Forums
|
BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8
This is the forum to discuss the Wrox book Professional CodeIgniter by Thomas Myer; ISBN: 9780470282458
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 3rd, 2009, 03:00 PM
Authorized User
 
Join Date: Jul 2009
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Another reason to go more 'traditional'?

Hi again,

Got back in to this again and moved forward a little. Got another issue and possibly another reason to go more 'traditional' on data design ... here it is:

My days of designing applications - admittedly not for the web but maybe environment is immaterial here - would lead me to start thinking about the entities in the application e.g. Categories, Subcategories & Products (so far, only on page 95 at the moment) and I would, by nature have defined them thus:

Categories table
----------------
CatId - primary key
CatDesc
CatStatus
etc.

Subcategories table
-------------------
CatId - primary key
SubcatId - primary key
SubcatDesc
SubcatStatus
etc.

Products table
-------------------
CatId - primary key
SubcatId - primary key
ProductId - primary key
ProductDesc
ProductThumb
ProductStatus
etc.

Now I can appreciate that changing the getSubCategories() in the mcats model demonstrates how easy it is to make changes that may have otherwise been considered more than trivial but ...

... going the 'traditional' route I refer to above, you would simply have to add an element to each of the Categories & Subcategories tables - a thumbnail - then your problem is solved purely, without any 'tricksy' code and you wouldn't have to reference the products table in the categories model to simply 'wrestle' with the data to make it do what you want it to do. Ok so you need another model for the Subcategories table but that's no hardship, right?

I'm new to MVC and Codeigniter so I could have this all (a) about (f) ...
any thoughts anyone?

P.S.

when I click on a link in the navbar I keep getting a 'The requested URL /ci/welcome/cat/7 was not found on this server.' message.
The link in the navbar points to 'http://localhost/ci/welcome/cat/7' as it should ... any ideas as to why the error keeps occurring?

Last edited by patch; August 3rd, 2009 at 03:06 PM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
"what is the reason" heerajee Oracle 1 March 24th, 2006 05:52 AM
What's the reason for this error? batli25 .NET Framework 1.x 2 December 5th, 2005 08:47 AM
Unknown reason arnab2410 Pro VB Databases 0 February 9th, 2004 05:09 AM
Chapter - Struts - Traditional or Model1- Pls help ipatchu JSP Basics 0 November 18th, 2003 03:06 AM
Code Execution Stops for No Known Reason tcarnahan Access VBA 6 October 28th, 2003 04:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.