Click to See Complete Forum and Search --> : Storing a video in a mysql database?


ahhgea
01-26-2008, 02:28 AM
I'm somewhat new to php and mysql and am looking for some advice.

I'm trying to get a video of mine stored in a table of mine called "tutorials." What would be the best way to do this? Would I store the video itself in the table or would I have to put it as a link pointing to the video? I need to get the video hosted on my server at /video/video1.mpg to my page but would like the video somehow in my database because it corresponds with other properties in my table?

smoseley
01-26-2008, 10:46 AM
You can go one of two ways:

Store the video in the file system and store the URL in a VARCHAR field in your table (if the video will only be accessed locally), or


Store the video as a BLOB field in your table (if the video will be accessed by multiple applications)

ahhgea
01-26-2008, 01:11 PM
...so I could just store the url itself (say from google's embed code) in the database and whenever I need it to show up I would just send a query to display the embedded code?