Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1097439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:26:00+00:00 2026-05-17T00:26:00+00:00

What i have is a rather large database of flight numbers based on divisions.

  • 0

What i have is a rather large database of flight numbers based on divisions. the flight number is entered as following eg: CCC-NOC001 where the number breaks down as follows CCC airline Code NOC division Code and 001 actual flight number.

Now i am trying to create a filter that will select flight number from the schedule based on the division code. now to clarify the way the flight numbers are entered into the database is in 2 fields the first being code which is always entered as CCC and the flight number which would be NOC001 etc.

So what i need if it is possible is to strip the numbers from the end of the flight number so that all that is searched for is the NOC or one of the other division codes currently there are 9 separate divisions. And i would like to be able to filter the queries so that if from the drop down list they select NOC then only the flight numbers with NOC will show in the table.

CCC-NOC001
CCC-NOC002
….
Any help you can give me would be greatly appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T00:26:01+00:00Added an answer on May 17, 2026 at 12:26 am
    $dbh = new PDO($dsn, $user, $password);
    $query = "select * from [TableName] where [ColumnName] like '%NOC%'";
    $stmt = $dbh->prepare($query);
    $stmt->execute();
    if ($stmt->rowCount() > 0) {  
       $resultset = $stmt->fetchAll(PDO::FETCH_ASSOC);
       foreach ($resultset as $row) {
           $flight = $row['ColumnName'];
           $flightNum = str_replace('CCC-NOC', '', $flight);
       }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database with a rather large number of tables, about 3500, and
I have a rather large project which contains a number of third-party dependencies which
I have a rather large database that has alot of decimal columns in alot
I'm about to start a new project which should have a rather large database.
I have a rather large database exposed to my application using LINQ-to-SQL. I need
I have data database containing some rather large strings, each of which holds a
I have rather large input XML files that must be converted to a given
I have a rather large file (150 million lines of 10 chars). I need
We have a rather large SVN repository. Doing SVN updates are taking longer and
I have a rather large (many gigabytes) table of data in SQL Server that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.