I have this code i need to use to get results from a database, I'm on codeigniter. This is how the query looks like,
$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;
}
the $bid in the where clause is got from this code,
$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;
}
Now the select uses only one $bid, how can I use the $bid as an array?