Query Help

It's been a long day, coding for 18 hours, can somebody take a look at my query and tell me why it's dieing?

						$update = ("UPDATE pr_projects SET 	
																	REPORT_ID = '".$projectData2['report_id']."', 
																	IND_DESC = '".$projectData2['ind_desc']."', 
																	PROJ_TIV = '".$projectData2['proj_tiv']."', 
																	PROJ_NAME = '".$projectData2['proj_name']."', 
																	OWN_TYPE = '".$projectData2['own_type']."', 
																	OWNER_ID = '".$projectData2['owner_id']."', 
																	OWNER_NAME = '".$projectData2['owner_name']."', 
																	OWNER_ADDR = '".$projectData2['owner_addr']."', 
																	OWNER_CITY = '".$projectData2['owner_city']."', 
																	OWNER_ST = '".$projectData2['owner_st']."', 
																	O_COUNTRY = '".$projectData2['o_country']."', 
																	OWNER_ZIP = '".$projectData2['owner_zip']."', 
																	OWNER_PH = '".$projectData2['own_ph']."', 
																	OWN_TITLE = '".$projectData2['own_title']."', 
																	OWN_CONTID = '".$projectData2['own_contid']."',
																	OWN_CONT = '".$projectData2['own_cont']."', 
																	OWN_EMAIL = '".$projectData2['own_email']."', 
																	DEV_TYPE = '".$projectData2['dev_type']."', 
																	DEV_ID = '".$projectData2['dev_id']."', 
																	DEV_NAME = '".$projectData2['dev_name']."', 
																	DEV_ADDR = '".$projectData2['dev_addr']."', 
																	DEV_CITY = '".$projectData2['dev_city']."',
																	DEV_ST = '".$projectData2['dev_st']."', 
																	D_COUNTRY = '".$projectData2['d_country']."', 
																	DEV_ZIP = '".$projectData2['dev_zip']."', 
																	DEV_PHONE = '".$projectData2['dev_phone']."', 
																	DEV_TITLE = '".$projectData2['dev_title']."', 
																	DEV_CONTID = '".$projectData2['dev_contid']."', 
																	DEV_CONT = '".$projectData2['dev_cont']."',
																	DEV_EMAIL = '".$projectData2['dev_email']."', 
																	REP_TYPE = '".$projectData2['rep_type']."', 
																	REP_ID = '".$projectData2['rep_id']."', 
																	REP_NAME = '".$projectData2['rep_name']."', 
																	REP_ADDR = '".$projectData2['rep_addr']."', 
																	REP_CITY = '".$projectData2['rep_city']."', 
																	REP_ST = '".$projectData2['rep_st']."',
																	R_COUNTRY = '".$projectData2['r_country']."', 
																	REP_ZIP = '".$projectData2['rep_zip']."', 
																	REP_PHONE = '".$projectData2['rep_phone']."', 
																	REP_TITLE = '".$projectData2['title']."', 
																	REP_CONTID = '".$projectData2['contid']."', 
																	REP_CONT = '".$projectData2['rep_cont']."', 
																	REP_EMAIL = '".$projectData2['rep_email']."',
																	PLANT_ID = '".$projectData2['plant_id']."', 
																	PLANT_NAME = '".$projectData2['plant_name']."', 
																	PLANT_ADDR = '".$projectData2['plant_addr']."', 
																	PLANT_CITY = '".$projectData2['plant_city']."', 
																	PLANT_ST = '".$projectData2['plant_st']."', 
																	PL_COUNTRY = '".$projectData2['pl_country']."', 
																	PLANT_ZIP = '".$projectData2['plant_zip']."',
																	PL_PHONE = '".$projectData2['pl_phone']."', 
																	COUNTY_ID = '".$projectData2['county_id']."', 
																	COUNTY_DES = '".$projectData2['county_des']."', 
																	REPORTDATE = '".$projectData2['reportdate']."', 
																	`STATUS` = '".$projectData2['status']."', 
																	AFE_UPDATE = '".$projectData2['afe_update']."', 
																	RFQ_UPDATE = '".$projectData2['rfq_update']."',
																	BID_UPDATE = '".$projectData2['bid_update']."', 
																	KO_UPDATE = '".$projectData2['ko_update']."', 
																	CPL_UPDATE = '".$projectData2['cpl_update']."', 
																	TIM_UPDATE = '".$projectData2['tim_update']."', 
																	AD_UPDATE = '".$projectData2['ad_update']."', 
																	RELEASE = '".$projectData2['release']."'
																	WHERE PROJECT_NO = '".$projectData2['project_no']."'") or die("Project Update Update" . mysql_error());

Open in new window



The actual query prints on screen with error:


UPDATE pr_projects SET REPORT_ID = '300095106*00*00', IND_DESC = 'Power', PROJ_TIV = '20000000', PROJ_NAME = 'SHIPPINGPORT NUCLEAR 832MW BEAVER VALLEY UNIT #2 1Q14 REFUEL OUTAGE', OWN_TYPE = 'PROJECT MANAGER', OWNER_ID = '1065753', OWNER_NAME = 'FirstEnergy Nuclear Operating Company', OWNER_ADDR = 'Route 168', OWNER_CITY = 'Shippingport', OWNER_ST = 'PA', O_COUNTRY = 'U.S.A.', OWNER_ZIP = '15077', OWNER_PH = '', OWN_TITLE = 'Technical Support Supt.', OWN_CONTID = '1168489', OWN_CONT = 'Justin Sciulli', OWN_EMAIL = 'sciullic@firstenergycorp.com', DEV_TYPE = 'PROJECT DIRECTOR', DEV_ID = '1065753', DEV_NAME = 'FirstEnergy Nuclear Operating Company', DEV_ADDR = 'Route 168', DEV_CITY = 'Shippingport', DEV_ST = 'PA', D_COUNTRY = 'U.S.A.', DEV_ZIP = '15077', DEV_PHONE = '724 682-7700', DEV_TITLE = 'Maintenance Director', DEV_CONTID = '1169093', DEV_CONT = 'David Huff', DEV_EMAIL = 'huffdm@firstenergycorp.com', REP_TYPE = 'SPECIFICATION AND RELIABILITY', REP_ID = '1065753', REP_NAME = 'FirstEnergy Nuclear Operating Company', REP_ADDR = 'Route 168', REP_CITY = 'Shippingport', REP_ST = 'PA', R_COUNTRY = 'U.S.A.', REP_ZIP = '15077', REP_PHONE = '724 682-7700', REP_TITLE = '', REP_CONTID = '', REP_CONT = 'Janet Kunz', REP_EMAIL = '', PLANT_ID = '1017303', PLANT_NAME = 'Beaver Valley Nuclear Power Station', PLANT_ADDR = 'Route 168', PLANT_CITY = 'Shippingport', PLANT_ST = 'PA', PL_COUNTRY = 'U.S.A.', PLANT_ZIP = '15077', PL_PHONE = '724 682-7700', COUNTY_ID = 'US*PA*BE', COUNTY_DES = 'Beaver', REPORTDATE = '20121011', `STATUS` = 'Active', AFE_UPDATE = '201303', RFQ_UPDATE = '201306', BID_UPDATE = '201402', KO_UPDATE = '201403', CPL_UPDATE = '201404', TIM_UPDATE = 'C2', AD_UPDATE = 'Scheduled Maintenance', RELEASE = '20121011' WHERE PROJECT_NO = '300095106'
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RELEASE = '20121011' WHERE PROJECT_NO = '300095106'' at line 64
LVL 1
t3chguyAsked:
Who is Participating?
 
johanntagleConnect With a Mentor Commented:
RELEASE is a reserved word so you need to enclose it in with slanting quotes i.e.`RELEASE`

You can find list of reserved words at http://dev.mysql.com/doc/refman/5.5/en//reserved-words.html
0
 
t3chguyAuthor Commented:
Thank you so much!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.