$data = 'select * from s_onlinechat where (userid = $chatme and resid =$chatuser) or (userid = $chatuser and resid =$chatme);';