Go Back   Tech Support Forum > Design Forum > Web Serving and Management

User Tag List

MY SQL Query help

This is a discussion on MY SQL Query help within the Web Serving and Management forums, part of the Tech Support Forum category. Hi all, As my project gathers pace I have noticed that some users are inputting Aircraft Models (field is "model")


Closed Thread
 
Thread Tools Search this Thread
Old 12-04-2017, 05:13 AM   #1
Elite Commander
 
VividProfessional's Avatar
 
Join Date: Apr 2009
Location: Merseyside Uk
Posts: 1,406
OS: Windows 10

My System

Send a message via MSN to VividProfessional

Hi all,
As my project gathers pace I have noticed that some users are inputting Aircraft Models (field is "model") as -

737-8AS
737-8k3
757-222
etc

What I want to do via a query is to run through these and add a leading "B", for instance the above would be changed to:

B737-8AS
B737-8k3
B757-222

What I have in my daily update line is -

Code:
UPDATE `spotting` SET `model`='B737-*' WHERE `model` = '737-*';
this doesnt appear to be picking them up, and the "simulate query" also returns 0 rows when i know full well there are (I put some in to test).

Where am I going wrong?

the first few lines of my daily update script is as follows:
Code:
UPDATE `spotting` SET `model`='B737-8AS/W' WHERE `model` = 'B737-8AS';
UPDATE `spotting` SET `model`='B737-8K5/W' WHERE `model` = 'B737-8K5';
UPDATE `spotting` SET `model`='B737-%' WHERE `model` = '737-%';
UPDATE `spotting` SET `operator`='United States Airforce' WHERE `operator` = 'US Airforce'
Everything else appears to be working fine
__________________
Boeing 787 Dreamliner Register
The worlds premier Dreamliner site
www.b787register.co.uk
VividProfessional is offline  
Sponsored Links
Advertisement
 
Old 12-05-2017, 07:20 AM   #2
Elite Commander
 
VividProfessional's Avatar
 
Join Date: Apr 2009
Location: Merseyside Uk
Posts: 1,406
OS: Windows 10

My System

Send a message via MSN to VividProfessional

so this doesnt work either
Code:
/* Set Boeings */
UPDATE `spotting` SET `model`='B707-%' WHERE `model` LIKE '707-%';
UPDATE `spotting` SET `model`='B717-%' WHERE `model` LIKE '717-%';
UPDATE `spotting` SET `model`='B727-%' WHERE `model` LIKE '727-%';
UPDATE `spotting` SET `model`='B737-%' WHERE `model` LIKE '737-%';
UPDATE `spotting` SET `model`='B747-%' WHERE `model` LIKE '747-%';
UPDATE `spotting` SET `model`='B757-%' WHERE `model` LIKE '757-%';
UPDATE `spotting` SET `model`='B767-%' WHERE `model` LIKE '767-%';
UPDATE `spotting` SET `model`='B777-%' WHERE `model` LIKE '777-%';
UPDATE `spotting` SET `model`='B787-%' WHERE `model` LIKE '787-%';
It does edit the data to give the leading "B" but it then drops every after the B737-xxx

where "737-8AS/W" becomes "B737-"
__________________
Boeing 787 Dreamliner Register
The worlds premier Dreamliner site
www.b787register.co.uk
VividProfessional is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
JoniCoupon File Type
I had a JoniCoupon infection at some point, years ago. Since then, I was under the impression I had killed it (using SuperAntiSpyware and others). But bizarrely, it has someone infected filed and has become a file type! More specifically, it has been infecting savegames from... games. If you...
MentalParadox Virus/Trojan/Spyware Help 22 08-10-2016 12:33 AM
Advertising Virus?
Hi, I have some kind of virus that creates text links on all websites I visit. When I hover over the link it shows a pic, and when I click it it send me to some affiliate url. PIC: https://i50.tinypic.com/2r26s8k.jpg Before coming here I tried to removed it myself with: AVG virus scan,...
pietpatat Resolved HJT Threads 48 05-06-2013 04:52 PM
Problems
I believe I have some corruption and/or malware on this system. Its an overall pain in the butt. Here is DDS: DDS (Ver_2012-11-20.01) - NTFS_x86 Internet Explorer: 9.0.8112.16450 BrowserJavaVersion: 10.5.1 Run by Josh at 9:20:56 on 2012-12-01
Jtsou Inactive Malware Help Topics 48 12-21-2012 06:55 AM
Internet Explorer Loads & Uses Tons of Memory
Internet Explorer runs on it's own--in the background--and uses tons of memory. This is similar to a problem that a user named MalusCalibur had back in 2008. IE loads up and runs from 30K and climbs to anywhere from 100-300K of Memory. I've quelled this problem by constantly having Windows...
Deeke777 Virus/Trojan/Spyware Help 35 06-26-2012 01:11 PM

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is on
Smilies are on
[IMG] code is on
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Post a Question


» Site Navigation
 > FAQ
  > 10.0.0.2
Powered by vBadvanced CMPS v3.2.3


All times are GMT -7. The time now is 07:30 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.1.0 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Copyright 2001 - 2018, Tech Support Forum

Windows 10 - Windows 7 - Windows XP - Windows Vista - Trojan Removal - Spyware Removal - Virus Removal - Networking - Security - Top Web Hosts