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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:09:33+00:00 2026-05-31T09:09:33+00:00

I have a need to upload 4,000 small audios (~30 seconds long) not ringtones

  • 0

I have a need to upload 4,000 small audios (~30 seconds long) not ringtones 🙂
Similarly I have 4,000 html files.
I came to know about mysql is the best way to work with such large quantities of data.
however I do not know how to work with mysql database, how to organize the audio & html files. if there is a working example then I would greatly appreciate your help.

  • 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-31T09:09:35+00:00Added an answer on May 31, 2026 at 9:09 am

    You can store files directly in MySQL using BLOB data types. However, the best way is to store the audio files in a directory, and then just store the path to the file in the database. This is because, after a certain point, it is more efficient to store files in a file-system rather than in a database.

    So your table could be,

    CREATE TABLE audio_files {
            id INT(11) NOT NULL AUTO_INCREMENT,
            path VARCHAR(256) NOT NULL,
            name VARCHAR(256) NOT NULL,
            PRIMARY KEY(id)
    }
    

    As it stands, you probably would find there wouldn’t be much of a performance difference because you are working with a small number of files – but for best practice and future scalability, put it in the file system!

    Then to pull out the data from the database you could use a simple PHP script to query the database and pull out all the paths and print them to the screen as links. In the example below im using PDO for database access, but you could also use the more simplistic mysql_query() if thats how your accessing your db.

    $query = $db->prepare("SELECT id, path FROM audo_files");
    $query->setFetchMode(PDO::FETCH_ASSOC);
    $query->execute();
    $files = $query->fetchAll();
    foreach($files as $file) {
          echo "<a href='" . $file['path'] . "'>" . $file['name'] . "</a>";
    }
    

    You would want to put your files in a publicly accessibly area on your web area e.g. in a folder assets/audio, and then just put a relative path in your database e.g. assets/audio/file1.mp3.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Actually I have to upload pdf files and need to read on my website
I need to upload files to server and that part I have successfully done,
I need every day update ~ 10.000 items in my MySql. I have upload
I have a large data set(250,000 rows) that I need to upload to a
I have a 3 huge 5GB .sql files which I need to upload to
I really need upload files bigger that 1 Mb, so i only have the
I need to upload a given image using Amazon S3 I have this PHP:
I have a byte[] of an image and I need to upload it as
I need to check if the images people upload to my site have the
In the web page, I have file upload widget. I need to show this

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.