About 23,759 results: "mysql_query"
Page 6 of 50
Filter Results
Sources
Languages
Filter Results
Try Search On


  1. 	if ( $old_path != '/' ) { // Used to be a subdomain so we can more safely replace.
  2. 		mysql_query( "UPDATE `" . $destination_db_prefix . "blogs` SET path=REPLACE( path, '" . mysql_real_escape_string( $old_path ) . "', '" . mysql_real_escape_string( $destination_path ) . "') WHERE domain='" . mysql_real_escape_string( $old_domain ) . "' AND path LIKE '" . mysql_real_escape_string( $old_path ) . "%'" );
  3. 	} else { // Used to be in root so much prepend new path.
  4. 		mysql_query( "UPDATE `" . $destination_db_prefix . "blogs` SET path=concat( '" . mysql_real_escape_string( rtrim( $destination_path, '/\\' ) ) . "', path ) WHERE domain='" . mysql_real_escape_string( $old_domain ) . "'" );
  5. 	// Update blog domain for all matching sites.
  6. 	mysql_query( "UPDATE `" . $destination_db_prefix . "blogs` SET domain='" . mysql_real_escape_string( $destination_domain ) . "' WHERE domain='" . mysql_real_escape_string( $old_domain ) . "'" );
  7. 	// Update fileupload_url in options table.
  8. 	mysql_query( "UPDATE `" . $destination_db_prefix . "options` SET option_value='" . mysql_real_escape_string( $wp_upload_url ) . "' WHERE option_name='fileupload_url' LIMIT 1" );
  9. 	// TODO: moved to bottom of this file.
  10. 	//mysql_query( "UPDATE `" . $destination_db_prefix . "options` SET option_name='" . $destination_db_prefix . "user_roles' WHERE option_name LIKE '%_user_roles' LIMIT 1" );
  11. 	// Update upload_path in options table.
  12. 	mysql_query( "UPDATE `" . $destination_db_prefix . "options` SET option_value='" . mysql_real_escape_string( str_replace( $new_url . '/', '', $wp_upload_url_real ) ) . "' WHERE option_name='upload_path' LIMIT 1" );
  13. 	// Update fileupload_url in options table.
  14. 	mysql_query( "UPDATE `" . $destination_db_prefix . "options` SET option_value='" . mysql_real_escape_string( $wp_upload_url ) . "' WHERE option_name='fileupload_url' LIMIT 1" );
  15. 	// TODO: moved to bottom of this file.
  16. 	//mysql_query( "UPDATE `" . $destination_db_prefix . "options` SET option_name='" . $destination_db_prefix . "user_roles' WHERE option_name LIKE '%_user_roles' LIMIT 1" );






  1. 	if ( $old_path != '/' ) { // Used to be a subdomain so we can more safely replace.
  2. 		mysql_query( "UPDATE `" . $destination_db_prefix . "blogs` SET path=REPLACE( path, '" . mysql_real_escape_string( $old_path ) . "', '" . mysql_real_escape_string( $destination_path ) . "') WHERE domain='" . mysql_real_escape_string( $old_domain ) . "' AND path LIKE '" . mysql_real_escape_string( $old_path ) . "%'" );
  3. 	} else { // Used to be in root so much prepend new path.
  4. 		mysql_query( "UPDATE `" . $destination_db_prefix . "blogs` SET path=concat( '" . mysql_real_escape_string( rtrim( $destination_path, '/\\' ) ) . "', path ) WHERE domain='" . mysql_real_escape_string( $old_domain ) . "'" );
  5. 	// Update blog domain for all matching sites.
  6. 	mysql_query( "UPDATE `" . $destination_db_prefix . "blogs` SET domain='" . mysql_real_escape_string( $destination_domain ) . "' WHERE domain='" . mysql_real_escape_string( $old_domain ) . "'" );
  7. 	// Update fileupload_url in options table.
  8. 	mysql_query( "UPDATE `" . $destination_db_prefix . "options` SET option_value='" . mysql_real_escape_string( $wp_upload_url ) . "' WHERE option_name='fileupload_url' LIMIT 1" );
  9. 	// TODO: moved to bottom of this file.
  10. 	//mysql_query( "UPDATE `" . $destination_db_prefix . "options` SET option_name='" . $destination_db_prefix . "user_roles' WHERE option_name LIKE '%_user_roles' LIMIT 1" );
  11. 	// Update upload_path in options table.
  12. 	mysql_query( "UPDATE `" . $destination_db_prefix . "options` SET option_value='" . mysql_real_escape_string( str_replace( $new_url . '/', '', $wp_upload_url_real ) ) . "' WHERE option_name='upload_path' LIMIT 1" );
  13. 	// Update fileupload_url in options table.
  14. 	mysql_query( "UPDATE `" . $destination_db_prefix . "options` SET option_value='" . mysql_real_escape_string( $wp_upload_url ) . "' WHERE option_name='fileupload_url' LIMIT 1" );
  15. 	// TODO: moved to bottom of this file.
  16. 	//mysql_query( "UPDATE `" . $destination_db_prefix . "options` SET option_name='" . $destination_db_prefix . "user_roles' WHERE option_name LIKE '%_user_roles' LIMIT 1" );



  1. 
                        
  2. 		mysql_query("INSERT INTO `hs_hr_emp_reportto` VALUES ('012', '011', 1);");
  3. 
                        
  4. 		mysql_query("INSERT INTO `hs_hr_leavetype` VALUES ('LTY010', 'Medical', 1)");
  5. 
                        
  6. 		mysql_query("TRUNCATE TABLE `hs_hr_weekends`;");
  7. 		$this->assertTrue(mysql_query("INSERT INTO `hs_hr_weekends` (day, length) VALUES (1, 0);"), mysql_error());
  8. 		$this->assertTrue(mysql_query("INSERT INTO `hs_hr_weekends` (day, length) VALUES (2, 0);"), mysql_error());
  9. 		$this->assertTrue(mysql_query("INSERT INTO `hs_hr_weekends` (day, length) VALUES (3, 0);"), mysql_error());
  10. 		$this->assertTrue(mysql_query("INSERT INTO `hs_hr_weekends` (day, length) VALUES (4, 0);"), mysql_error());
  11. 		$this->assertTrue(mysql_query("INSERT INTO `hs_hr_weekends` (day, length) VALUES (5, 0);"), mysql_error());
  12. 		$this->assertTrue(mysql_query("INSERT INTO `hs_hr_weekends` (day, length) VALUES (6, 0);"), mysql_error());
  13. 		$this->assertTrue(mysql_query("INSERT INTO `hs_hr_weekends` (day, length) VALUES (7, 0);"), mysql_error());
  14. 
                        
  15. 		//Leave 1
  16. 		mysql_query("INSERT INTO `hs_hr_leave_requests` (`leave_request_id`, `leave_type_id`, `leave_type_name`, `date_applied`, `employee_id`) VALUES (10, 'LTY010', 'Medical', '".date('Y-m-d', time()+3600*24)."', '011')");
  17. 		mysql_query("INSERT INTO `hs_hr_leave` (`leave_request_id`, `leave_id`, `employee_id`, `leave_type_id`, `leave_date`, `leave_length_days`, `leave_length_hours`, `leave_status`, `leave_comments`) VALUES (10, 10, '011', 'LTY010', '".date('Y-m-d', time()+3600*24)."', 0.12, 1, 1, 'Leave 1')");









Back to Top