public function getTablesByLocation($location_id = FALSE)
{
$this->db->from('location_tables');
$this->db->where('location_id', $location_id);
$query = $this->db->get();
$location_tables = array();
if ($query->num_rows() > 0) {
foreach ($query->result_array() as $row) {
$location_tables[] = $row['table_id'];
}
}
return $location_tables;
}