Welcome Guest, Not a member yet? Register   Sign In
Another MySQL question
#2

[eluser]Skulls[/eluser]
Code:
$try_this_sql=" SELECT * from projects WHERE ((project_client_id=$this->session->userdata('uid')) OR (project_contractor_id=$this->session->userdata('uid') ))
AND (project_creator_id !=$this->session->userdata('uid')) ";
$query=$this->db->query($try_this_sql);
$result=$query->result();


use the brackets to group conditions .. where (color=red or color=green) and (color!=black)


Messages In This Thread
Another MySQL question - by El Forum - 12-31-2007, 10:03 AM
Another MySQL question - by El Forum - 12-31-2007, 10:28 AM
Another MySQL question - by El Forum - 12-31-2007, 10:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB