Solved

Query Help

Posted on 2013-01-12
2
317 Views
Last Modified: 2013-01-13
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
0
Comment
Question by:t3chguy
2 Comments
 
LVL 24

Accepted Solution

by:
johanntagle earned 500 total points
ID: 38771451
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
 
LVL 1

Author Closing Comment

by:t3chguy
ID: 38771521
Thank you so much!
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now