rsammy Posted January 31, 2007 Share Posted January 31, 2007 this is my query. i need to check for length of pat_ssn! i shud not display it if it is greater than 9 digits!!! $query2="SELECT visit_mgr.visit_id, visit_mgr.visit_pat_id, visit_mgr.visit_phy_id, Date_Format(visit_mgr.visit_date, '%m/%d/%Y') as date, phy_det.phy_fname, phy_det.phy_minit, phy_det.phy_lname, pat_dgraphics.pat_first_name, pat_dgraphics.pat_last_name, Date_Format(pat_dgraphics.pat_dob, '%m/%d/%Y') as pat_birthday, pat_dgraphics.pat_ssn, pat_dgraphics.pat_ID, visit_mgr.client_id, dcn_approved_for_billing, dcn_posted_for_billing FROM visit_mgr, phy_det, pat_dgraphics, dcn WHERE visit_mgr.visit_type like '%$select1%' AND phy_det.phy_id=visit_mgr.visit_phy_id AND visit_mgr.visit_pat_id=pat_dgraphics.pat_ssn AND phy_det.phy_fname like '%$search3%' AND phy_det.phy_lname like '%$search4%' AND pat_dgraphics.pat_first_name like '%$search1%' AND pat_dgraphics.pat_last_name like '%$search2%' AND pat_dgraphics.pat_ssn like '%$search5%' AND visit_mgr.client_id $clientid AND visit_date <= '$dates' AND visit_date >= '$datez' AND dcn.dcn_tran_ID=visit_mgr.visit_palm_db_id AND dcn_posted_for_billing='No' ORDER BY $select3 $select"; any help please? Quote Link to comment Share on other sites More sharing options...
marcus Posted January 31, 2007 Share Posted January 31, 2007 $row = mysql_fetch_assoc($query2); if(strlen($row['pat_ssn']) > 9){ //dont echo }else { echo $row['pat_ssn']; } Quote Link to comment Share on other sites More sharing options...
rsammy Posted February 1, 2007 Author Share Posted February 1, 2007 thanx, i figured it out too! problem solved Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.