[eluser]Davcon[/eluser]
Hi,
I have a question about basic table selection using the Active Record method.
I understand that the method for a basic table select would be:
Code:
$query = $this->db->get('mytable');
foreach ($query->result() as $row)
{
echo $row->title;
}
However, there's something about this which bothers me and I can't find an answer.
Suppose $title happens to be empty (i.e., NULL) on a particular row. Now, let's say you wanted to replace that nothingness with a hyphon (after all, empty boxes can ruin table cells). How can you possibly do that in an elegant manner using Active Record?
I guess I could have asked the same thing about stripping slashes, string replacing or doing any kind of manipulation of the data that's being selected.
Thanks for your help.