So the scenario is this: I currently have a DB with TV Shows with RSS Feeds. The feeds (TV Shows) table has ID, name, network, feed, active. I have setup a field in the accounts table called favourites, i thought comma delimited ID's of the TV Shows might be a good idea, but im not sure anymore.
I am currently looking to implement a controller in CI that will look at the DB in the favourites field, for eg if it was filled with 104,149,150
How can I get those ID's to transfer into the view so I can set the values to the respective Show's?
<?php foreach ($shows as $show) { ?>
<div class="grid_1">
<? $data = array(
'name' => $show['name'],
'id' => $show['id'],
'value' => $show['name'],
'checked' => FALSE,
);
echo form_checkbox($data); ?>
</div>
<div class="item"><?=form_label($show['name']);?></div>
<?php } ?>
The view currently outputs the TV shows in the database with a check box next to each show, what is the best way for me to set user preferences for favourites? So that I can set the values of each checkbox according to the user preference
I hope I have explained what I am trying to do well,
Thanks!