rbama Posted April 1, 2010 Share Posted April 1, 2010 Hi I successfully uploaded a video(.wmv) file into the mysql database converting into binary data. i dont know how to display the video file(.wmv) to my website. Anybody can help, as i am new to php. Thanks in Advance Quote Link to comment https://forums.phpfreaks.com/topic/197194-how-do-i-display-wmv-file-from-mysql/ Share on other sites More sharing options...
sspoke Posted April 1, 2010 Share Posted April 1, 2010 wow thats fucking crazy.. mysql shouldn't be used to store binary files.. it will kill your performance think about it if your wmv video file is even 1 MB thats already insane. It will send a mysql result and until its fully sent threw it won't do any other queries from other users meaning lag for no reason, yes mysql is multithreaded but are wasting all of them with 20 connections at once even on the default configuration. Better store wmv where they belong to be stored on a harddrive.. even on a PHP file its much better to inline it in a binary array then using mysql. Anyways what you have in mysql is just binary data you cannot simply display binary that.. only one thing you can do with binary that is save it to your harddrive on your PHP host.. which you could of did in the first place without using mysql? but now if you decide to use mysql you will be reading binary data from mysql creating a temporary file on your host and dumping the binary data to that.. then loading it up using a url.. http://site.com/file/movie.wmv. so in other case this is really useless Quote Link to comment https://forums.phpfreaks.com/topic/197194-how-do-i-display-wmv-file-from-mysql/#findComment-1035090 Share on other sites More sharing options...
oni-kun Posted April 1, 2010 Share Posted April 1, 2010 I'd disagree with the previous post, But for any site that will be sharing videos of any level should not be using an external database to handle the physical data, even on a small scale it is extremely inefficient. Seeing as you're not sure how to work with BLOB/binary fields in *SQL you may as well quit while you're ahead, ask yourself; Is it worthful to learn how to do something that is that inefficient? Quote Link to comment https://forums.phpfreaks.com/topic/197194-how-do-i-display-wmv-file-from-mysql/#findComment-1035093 Share on other sites More sharing options...
rbama Posted April 1, 2010 Author Share Posted April 1, 2010 if like that, may i know how to upload a file inside the folder and save the path in mysql. Quote Link to comment https://forums.phpfreaks.com/topic/197194-how-do-i-display-wmv-file-from-mysql/#findComment-1035096 Share on other sites More sharing options...
oni-kun Posted April 1, 2010 Share Posted April 1, 2010 if like that, may i know how to upload a file inside the folder and save the path in mysql. It's the most simple project. It's pointless to write all this code for you, use a tutorial and learn. Quote Link to comment https://forums.phpfreaks.com/topic/197194-how-do-i-display-wmv-file-from-mysql/#findComment-1035097 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.