|All requests||>||Play or download wav file from MySQL||>||Request new recommendation||>||Featured requests||>||No recommendations|
by Michael L Parmley - 5 years ago (2016-10-12)
I need to play or download wav file from MySQL without writing to disc.
4. by lahomma - 4 years ago (2016-12-22) Reply
I can't open
3. by Haseeb Ahmad Basil - 5 years ago (2016-11-01) Reply
Is the .wav file stored in DB as BLOB or what?
2. by Manuel Lemos - 5 years ago (2016-11-01) Reply
I don't know if it is possible to do that or even desirable.
What happens is that when you use unbuffered queries, while the database client is retrieving data from the database, an implicit transaction is going, meaning that you may be implicitly locking the tables until the whole result set is retrieved.
Still MySQLi has the store_result function for the statement objects. It retrieves and store the whole result set so will not hold the result set. I am just not sure if the result set is stored in memory or in a temporary file to avoid exhausting PHP memory to the limit.
Anyway, I don't know of a class that can do that so far.
1. by Oleg Zorin - 5 years ago (2016-10-14) Reply
Do you have .wav already in DB or you just planing to use DB for.wav?
If you just planing, probably it's better to store them like common files. Flash players (I have such a player) and HTML5 players (I guess) allow to start playing media before whole file uploaded to browser.
By the way, MySQL DB is also stored on disc.