Welcome Guest, Not a member yet? Register   Sign In
Nested Query Question (NEWBIE)
#9

[eluser]JesseR[/eluser]
Quote:class Mdl_country extends Model implements Iterator {

Is Implements Iterator the name of the model you made or
is this an actual function built into CI?

Quote:As you can see, in order to print the country-code, I ask a specialised method ‘getCode()’. In there I check what is written in the field and slightly modify it if a given rule matches.
In your case this method could be called ‘getPrice()’, where you could implement your own logic (if field is null, take another one etc.).

So I would have to create a special function for each field?

Example: I have an ITEM DESCRIPTION, LONG DESCRIPTION in both items and item_eq table.
If the value in the ITEM_EQ table is empty for any fields then we use the value of
the matching record in the ITEMS table.


Messages In This Thread
Nested Query Question (NEWBIE) - by El Forum - 01-13-2010, 03:49 PM
Nested Query Question (NEWBIE) - by El Forum - 01-13-2010, 04:38 PM
Nested Query Question (NEWBIE) - by El Forum - 01-13-2010, 04:55 PM
Nested Query Question (NEWBIE) - by El Forum - 01-13-2010, 05:26 PM
Nested Query Question (NEWBIE) - by El Forum - 01-13-2010, 11:05 PM
Nested Query Question (NEWBIE) - by El Forum - 01-14-2010, 03:35 AM
Nested Query Question (NEWBIE) - by El Forum - 01-14-2010, 07:12 AM
Nested Query Question (NEWBIE) - by El Forum - 01-14-2010, 08:42 AM
Nested Query Question (NEWBIE) - by El Forum - 01-14-2010, 12:08 PM
Nested Query Question (NEWBIE) - by El Forum - 01-14-2010, 03:08 PM
Nested Query Question (NEWBIE) - by El Forum - 01-15-2010, 03:15 AM
Nested Query Question (NEWBIE) - by El Forum - 01-15-2010, 07:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB