Solved

Query Help

Posted on 2013-01-12
2
323 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Undefined variable with $_POST in PHP 5 40
php time 12 30
PHP, Curl and XML 13 18
DB::table where condition with nested if condition 4 12
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

710 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