Код: Выделить всё
$this->db->select('*');
$this->db->where('broadcast_id', $bid);
$query = $this->db->get('ih_noticeboard');
$result = $query->result();
if ($query->num_rows() < 1) {
$data = "no feed ";
} else {
$data = $result;
}
Код: Выделить всё
$this->db->select('broadcast_id');
$this->db->where('broadcast_subscribers', $id);
$query = $this->db->get('ih_broadcastors ');
if ($query->num_rows() < 1) {
$data = "user not subscribed to any broadcasting";
} else {
$ress = $query->result();
foreach ($ress as $row) {
$bid = $row->broadcast_id;
}
Подробнее здесь: https://stackoverflow.com/questions/284 ... odeigniter
Мобильная версия