Jump to content

[SOLVED] help with field length in mysql query


rsammy

Recommended Posts

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?

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.