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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:57:26+00:00 2026-05-27T05:57:26+00:00

I have read several forums that advise against storing videos in a database. I

  • 0

I have read several forums that advise against storing videos in a database. I unfortunately am forced to do so based on constraints for a school project I am working on. I was wondering if someone would let me know where I am going wrong when trying to store my video into the database. We are using an embedded procedure(someone else in my group wrote them that may be the problem)but after retrieving the video from the form it is returned as an Array which contains the name, type, error, location, etc(things associated with the video). After retrieving the array from the form I naively tried to insert the whole thing into the data based via function call through a query as seen below. This gives an immediate error “Unknown column ‘Array’ in ‘field list’ “. I get that Array is the type of $video after we pull it from the form but I’m not sure where to go from there.

if(empty($_FILES['sonogram'])) {
    echo 'The file exceeded maximum';
}
else {
    $video = $_FILES['sonogram'];
}

//call our embedded procedure to add the video to the database
mysql_query("call SaveImage($studyId, $video, 'nothing new')");

Could anyone just let me know if I am making a simple error(syntax, etc..) or if there is something missing due to working with the blob/mp4.

Thanks

  • 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-27T05:57:26+00:00Added an answer on May 27, 2026 at 5:57 am

    $_FILES is basically just an information array. It doesn’t contain your actual file. You will need to open the file, read the content and then save it to the database.

    Never tested the following, especially with videos:

    // Read the video file content from the temp file.
    // Usually on uploads you move the file.
    $video = file_get_contents($_FILES['sonogram']['tmp_name']);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read several forums but can't find the solution to this. int sIndex
I have read in several places that it's possible to share the objects directory
I have read several articles/questions/forums discussing the best auto-complete plugin for jQuery. After trying
We have several sites that use Forms Based authentication (FBA) within SharePoint. Many of
First, I must say that I have read several post about this at StackOverflow
I have read several topics (like this one: Database field containing HTML display raw
I have read several documentations about building custom ErrorHandler (by inheriting from IErrorHandler). Unfortunately,
I have read at several places that transport security is only hop to hop
I have read several articles and questions on concept of foreign key vs independent
I have read several post on both matters but I haven't seen anyone comparing

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.