Need to create array before using it

This commit is contained in:
phl0
2024-09-12 15:50:50 +02:00
parent d1d9db9cf6
commit eae979dae7

View File

@@ -43,6 +43,7 @@ class Stations extends CI_Model {
$this->db->select('station_profile.station_id');
$this->db->where('user_id', $userid);
$query=$this->db->get('station_profile');
$a_station_ids = array();
if ($query->num_rows() > 0){
foreach ($query->result() as $row) {
array_push($a_station_ids, $row->station_id);