Welcome Guest, Not a member yet? Register   Sign In
data pass through session
#2

[eluser]zreedeecom[/eluser]
I'm not quite sure what are you doing in your model Function but.. here is a hint:

Code:
function get_user_id(){
  $this->db->where('username', $this->input->post('username'))->where('password', $this->input->post('password'));
  $q = $this->db->get('users');
  if ( $q->num_rows() > 0 ) {
    //do something with: $q->result() or $q->row()
  }
  else {
    //No records founded
  }
} //end get_user_id()

Note: Try to use more generic names for your tables and rows like "USERS", "USER_ID" etc.. it's easier to remember


Messages In This Thread
data pass through session - by El Forum - 08-23-2010, 04:52 AM
data pass through session - by El Forum - 08-23-2010, 09:18 AM
data pass through session - by El Forum - 08-25-2010, 12:47 AM
data pass through session - by El Forum - 08-25-2010, 02:58 AM
data pass through session - by El Forum - 08-26-2010, 02:50 AM
data pass through session - by El Forum - 08-26-2010, 04:20 AM
data pass through session - by El Forum - 08-27-2010, 11:19 PM
data pass through session - by El Forum - 08-28-2010, 04:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB