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 8931009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:00:56+00:00 2026-06-15T09:00:56+00:00

Everyday I receive a csv file with phone numbers. I’ve built an array that

  • 0

Everyday I receive a csv file with phone numbers. I’ve built an array that grabs the data from the csv. What I need to do is loop through the array and search a mysql database for matches. Can one of your gurus be so kind as to point me in the right direction?

  • 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-06-15T09:00:57+00:00Added an answer on June 15, 2026 at 9:00 am

    I would suggest to create temporary table, then load your numbers into this table and then just simply select & join to your table. You can insert your phones in program (multilple rows in one INSERT or if you has access to server shell, you can do some script like this:

    -- you can use TEMPORARY table in one transaction or you can just
    -- make sure that the table exists and flush it before import
    
    CREATE TABLE IF NOT EXISTS phonenumbers (
        number varchar(10) primary key
    );
    
    TRUNCATE TABLE phonenumbers;
    
    LOAD DATA LOCAL INFILE 'numbers.csv' INTO TABLE phonenumbers;
    
    -- here in script or call it from your program to work with data
    -- also you can add  INTO OUTFILE 'output.csv' to export filtered data
    -- into outfile 
    
    SELECT addressbook.* FROM addressbook LEFT JOIN phonenumbers on (addressbook.phone = phonenumbers.number);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my script, I need to receive information from database (with httpd log file),
I need to import everyday a file containing the yesterday's snapshot of a database.
everyday I encounter a very strange phenomenon. From my university internet connection, sshing to
I have a database backup running hourly between 7am and 7pm everyday, each file
An everyday debugging situation for Java developers is that in which an Exception is
I receive 2 XML files from a third party service every day and I
We have a python script that sends mails everyday to an xml list of
We have a database that gets updated everyday at midnight with a cronjob, we
I have just begun using C everyday and was wondering, besides data structures (eg,
I receive new data files every day. Right now, I'm building the database with

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.