Skip to content

Commit

Permalink
Adds missing method 'existRoute'
Browse files Browse the repository at this point in the history
  • Loading branch information
LaercioSantana committed Jul 24, 2016
1 parent 080ade7 commit d4213f0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions application/models/Routes_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,15 @@ public function deletePoints($id){
$this->db->where('id_routes', $id);
$this->db->delete(self::pointsTable);
}
public function existRoute($id){
$route = $this->db->select('id_routes')
->from(self::table)
->where(self::table.".id_routes = {$id}")
->get()->result();

if(count($route) > 0)
return true;

return false;
}
}

0 comments on commit d4213f0

Please sign in to comment.