MySQL Forums
Forum List  »  Newbie

database not updateing since update
Posted by: John Biddulph
Date: June 24, 2015 04:12AM

Hi,

I recently updated my web server and things have stopped working.
I am trying to update a record in my database via a PHP page but data is not being passed through, here is my SQL:
// Generate course details sql
				$SQL="UPDATE courses 
							SET 
								duration='$duration', 
								important_information='$important_information', 
								terms='$terms', 
								exam_board_fee='$exam_board_fee',
								how_to_apply='$how_to_apply',  
								special='$special',  
								special_home='$special_home',  
								special_home_message='$special_home_message',  
								special_home_finish='$special_home_finish',  
								domains='$CL$FLUK$CLT$CT$SGA$FLNY', 
								application_form='$application_form', 
								is_interview_required='$is_interview_required',
								allow_direct_payment='$allow_direct_payment',
								name='$name', 
								school_id='$school_id', 
								related='$related', 
								ranking='$ranking', 
								language='$language', 
								type_old='$parts[1]', 
								course_type_id_old='$parts[0]', 
								type='$type',
								course_type_id='$course_type_id',
								sector_id='$sector_id',
								certificate_received='$certificate_received',
								frequency='$frequency',
								delivery_method='$delivery_method',
								tefl_level='$tefl_level',
								duration_tefl='$duration_tefl',
								duration_type_tefl='$duration_type_tefl',
								quality_assurance='$quality_assurance',
								external_validation='$external_validation',
								dialect='$dialect', 
								min_age='$min_age', 
								max_age='$max_age', 
								average_size='$average_size', 
								min_size='$min_size', 
								max_size='$max_size', 
								course_material='$course_material', 
								material_info='$material_info',
								level_changes='$level_changes', 
								content='$content', 
								text_books='$text_books', 
								nationalities='$nationalities', 
								comments='$comments', 
								inclusive='$inclusive', 
								transfer_inclusive='$transfer_inclusive', 
								average_price='$average_price', 
								active='$active',
								live='$live',
								vatable='$vatable',
								commission_info='$commission_info',
								commission_course='$commission_course',
								course_linked_id='$course_linked_id',
								course_help_for_jobs='$course_help_for_jobs',
								language_id='$language_id',
								courses_percentage_recommended='$courses_percentage_recommended', ";
								
								// cactus_name fields for each language
								$SQL.="cactus_name='".isset($cactus_name['_english'])."',";
								if(is_array(isset($cactus_name))):
								isset($cactus_name);
									while ( list( $key, $value ) = each($cactus_name)):
										$SQL.="cactus_name$key='$value',";
									endwhile;
								endif;
								// class_time fields for each language
								$SQL.="class_time='".isset($class_time['_english'])."',";
								if(is_array(isset($class_time))):
									while ( list( $key, $value ) = each(mysql_real_escape_string($class_time)) ):
										$SQL.="class_time$key='$value',";
									endwhile;
								endif;
								// description fields for each language
								if(is_array(isset($description))):
									while ( list( $key, $value ) = each(mysql_real_escape_string($description)) ):
										$SQL.="description$key='$value',";
									endwhile;
								endif;
				 $SQL.="updated='$timestamp' 
								WHERE id=$id";
				//echo $SQL;
					$q->query($DB, $SQL);

Options: ReplyQuote


Subject
Written By
Posted
database not updateing since update
June 24, 2015 04:12AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.