veluit06 Posted June 17, 2009 Share Posted June 17, 2009 Hi anyone tel me the procedure upload a videos and store that video in Mysql inside the table field, this and all using php and Mysql, can u tel me the procedure and sample examples..... Link to comment https://forums.phpfreaks.com/topic/162513-adding-videos-to-mysql/ Share on other sites More sharing options...
MadTechie Posted June 17, 2009 Share Posted June 17, 2009 Sure.. however I hope your aware this will use up a lot of space in the tables and generally I wouldn't recommend it (but theirs always exceptions) Basically you want to store the data in a blob, ie $data = readfile("myFile.mov"); $SQL = "INSERT into table Set myBLOB = $data"; this article is a little out dated but should at least show you the whole idea http://www.devarticles.com/c/a/MySQL/Blobbing-Data-With-PHP-and-MySQL/ Link to comment https://forums.phpfreaks.com/topic/162513-adding-videos-to-mysql/#findComment-858528 Share on other sites More sharing options...
veluit06 Posted June 18, 2009 Author Share Posted June 18, 2009 thanks for this code. after storing this video, i want to display that video in mentioned page, what is procedure for that, Link to comment https://forums.phpfreaks.com/topic/162513-adding-videos-to-mysql/#findComment-858821 Share on other sites More sharing options...
MadTechie Posted June 18, 2009 Share Posted June 18, 2009 Okay create a file for displaying the videos ie video.php Now your going to pass the ID for the video you wish to play Now playing a video will be the same as linking to the file directly but instead of doing src="myvideo.mpg" you will use src="video.php?ID=99" Now the video.php file does a query to find the correct video record (ie WHERE ID = {$_GET[iD]}) and echos the blob, and thats it.. Link to comment https://forums.phpfreaks.com/topic/162513-adding-videos-to-mysql/#findComment-858937 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.