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

[eluser]überfuzz[/eluser]
[quote author="obiron2" date="1252082318"]If your array is only 2 levels deep, you may find it easier to fetch the years from the database into an array using a SELECT DISTINCT
and then append the event data into each array element using another db query with the year as a filter.Obiron[/quote]

I think I get the idea... Could you give me a hint on how I should write the query? This is a part of the model I was referring to earlier.

Code:
function get_array_to_dl($table_one, $column_one, $table_two,$coulmn_two,$link_column_one, $link_column_two,$order)
    {
        $this->db->select($table_one.'.'.$column_one.' AS when');
        $this->db->select($table_two.'.'.$coulmn_two.' AS event');
        $this->db->from($table_one);
        $this->db->join($table_two, $table_two.'.'.$link_column_two.' = '.$table_one.'.'.$link_column_one);

        $this->db->order_by($table_one.'.'.$link_column_one, $order);
    //etc...
    }


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