<?php 
/**
* 
*/
class LoginModel extends Model
{
  
  public function __construct()
  {
    parent::__construct();
  }

  public function signIn($email)
  {
    $email = $this->db->real_escape_string($email);
    $sql = "SELECT id,email,user_name,emp_code,segment_name,role_id,profile_image_path,rating,designation,enroll_courses, password FROM usuarios WHERE email = '{$email}'";
    return $this->db->query($sql);
  }
  public function get_current_segment_data($session_seg_name)
  {
   // $query="SELECT * FROM segments where subtxt='".strtoupper($session_seg_name)."'";
   $query="SELECT * FROM segments where subtxt='".$session_seg_name."'";
    $result = $this->db->query($query);
    return $result->fetch_all(MYSQLI_ASSOC);
  }
}