Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // GET FMCSA TAKES OVER 50 seconds..... i even try to use cache
- // Get FMCSA Data
- function GetFMCSA($type, $number)
- {
- $this->db = $this->load->database('facsa_db', TRUE); // Use Database
- $this->db->cache_on();
- // Run Query
- $query = NULL;
- if ($type == 'mc') { $query = $this->db->get_where('data_fmcsa', array('docket_number' => $number)); }
- else { $query = $this->db->get_where('data_fmcsa', array('usdot' => $number), 1); }
- // Return Data
- if ($query->num_rows() >= 1) {
- foreach ($query->result() as $row) { $data[] = $row; }
- return $data[0];
- }
- $this->db->cache_off();
- return FALSE;
- }
Add Comment
Please, Sign In to add comment