Welcome Guest, Not a member yet? Register   Sign In
[Solved] Get data from database
#2

I think I have worked it out using or_where in function seemed to do the trick


PHP Code:
public function get_user_mail() {

//$this->db->where('from_user', $this->session->userdata('username'));
$this->db->or_where('to_user'$this->session->userdata('username'));

$query $this->db->get('user_mail');

if (
$query->num_rows() > 0) {
return 
$query->result_array();
} else {
return 
false;
}

There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply


Messages In This Thread
[Solved] Get data from database - by wolfgang1983 - 06-29-2015, 02:07 AM
RE: [Question] Get data from database - by wolfgang1983 - 06-29-2015, 04:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB