Welcome Guest, Not a member yet? Register   Sign In
Questions regarding <dl> in CI.
#14

[eluser]überfuzz[/eluser]
[quote author="Aken" date="1252341503"]That is an insane amount of variables to pass through a single model function. It's perfectly acceptable (and recommended) to use a few methods with specific functionality, instead of something like that where you are still entering a ton of info into each call.

My recommendation? Make two model functions. One to pull the database information as it normally would (your first example). A second function - the one you'd actually use in this situation - would pull the DB info using the first function, and then format it specifically for the definition list.[/quote]

So your suggestion is as follows:
1. A specific model for each call? (In my case I have 5 different calls that have to be done in a similar way but to different sql-table. Each call fetches something like 2 or 10 rows.)
2. One function that alter the array, call this method from each query-method.
3. Pass the return the now altered array from each query-function.

Whats the downside in having a bunch of variables pass to a function in contrast to having a bunch of functions?


Messages In This Thread
Questions regarding <dl> in CI. - by El Forum - 09-03-2009, 02:41 PM
Questions regarding <dl> in CI. - by El Forum - 09-03-2009, 04:21 PM
Questions regarding <dl> in CI. - by El Forum - 09-03-2009, 06:44 PM
Questions regarding <dl> in CI. - by El Forum - 09-03-2009, 11:43 PM
Questions regarding <dl> in CI. - by El Forum - 09-04-2009, 01:40 AM
Questions regarding <dl> in CI. - by El Forum - 09-04-2009, 01:46 AM
Questions regarding <dl> in CI. - by El Forum - 09-04-2009, 02:10 AM
Questions regarding <dl> in CI. - by El Forum - 09-04-2009, 02:12 AM
Questions regarding <dl> in CI. - by El Forum - 09-04-2009, 02:19 AM
Questions regarding <dl> in CI. - by El Forum - 09-04-2009, 03:10 AM
Questions regarding <dl> in CI. - by El Forum - 09-04-2009, 05:38 AM
Questions regarding <dl> in CI. - by El Forum - 09-07-2009, 02:30 AM
Questions regarding <dl> in CI. - by El Forum - 09-07-2009, 05:38 AM
Questions regarding <dl> in CI. - by El Forum - 09-07-2009, 05:51 AM
Questions regarding <dl> in CI. - by El Forum - 09-07-2009, 06:24 AM
Questions regarding <dl> in CI. - by El Forum - 09-07-2009, 06:58 AM
Questions regarding <dl> in CI. - by El Forum - 09-07-2009, 08:11 AM
Questions regarding <dl> in CI. - by El Forum - 09-07-2009, 11:05 AM
Questions regarding <dl> in CI. - by El Forum - 09-07-2009, 05:08 PM
Questions regarding <dl> in CI. - by El Forum - 09-08-2009, 12:45 AM
Questions regarding <dl> in CI. - by El Forum - 09-08-2009, 01:04 AM
Questions regarding <dl> in CI. - by El Forum - 09-08-2009, 03:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB