How to store audio and video files for search & manipula

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
krraleigh
Forum Commoner
Posts: 86
Joined: Tue Jul 17, 2007 2:52 pm

How to store audio and video files for search & manipula

Post by krraleigh »

My church presently has about 40 some odd links to audio and video files on one page.
I would like to dump them into a file or database so that I can pull the last
5 files according to date created and display them on the webpage automatically.
I could then have an upload page so that the files can be uploaded and I won't
have to constantly keep updating the display page.

Can you advise me on how I might do this?
I don't see anyway to store this type of data in a mySQL database
so how do I create this setup? Do I store file paths? :?:

Kevin
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

Yes, store the path to the file on the server.
Use an auto_increment primary key on a field called id

To display the most recent 5

Code: Select all

SELECT * FROM `tablename` ORDER BY `id` DESC LIMIT 0, 5
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
krraleigh
Forum Commoner
Posts: 86
Joined: Tue Jul 17, 2007 2:52 pm

Post by krraleigh »

I tripped over the answer

Use blobs

http://www.onlamp.com/pub/a/php/2000/09 ... mysql.html

Thank You
Kevin
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

Post by Rovas »

scottayy wrote:Yes, store the path to the file on the server.
Use an auto_increment primary key on a field called id
This is the best method because the server has a faster response time than using media files embedded in the database.
krraleigh
Forum Commoner
Posts: 86
Joined: Tue Jul 17, 2007 2:52 pm

Post by krraleigh »

Thank You
Kevin
Post Reply