sh1fralf4tih

M MAP

Dec 8th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
  2.  
  3. class M_map extends CI_Model {
  4.     function __construct()
  5.     {
  6.         parent::__construct();
  7.     }
  8.  
  9.     public function get_coordinates()
  10.     {
  11.         $return = array();
  12.         $this->db->select("LAT,LNG");
  13.         $this->db->from("v_route");        
  14.         $query = $this->db->get();
  15.         if ($query->num_rows()>0) {            
  16.             foreach ($query->result() as $row)
  17.             {                
  18.                 array_push($return, $row);            
  19.             }        
  20.         }
  21.         return $return;
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment