[eluser]Thorpe Obazee[/eluser]
[quote author="linderox" date="1244025421"]I want to take just a 'title' from the table if I have 'alias' unique value.
I use this way, but I think this problem has simpler solution than create an array
Code:
function gettitle($galleryalias)
{
$this->db->select('title')->where('alias',$galleryalias);
$query = $this->db->get('photostock_catg');
if ($query->num_rows() > 0)
{
// you only want one row then,
return $query->row()->title;
}
return FALSE;
}
[/quote]