Re: Play a Mysql Blob (wave) file?

This post is from the topic: Play a Mysql Blob (wave) file?

27418 estes53
Posted: 2007-05-17 16:49:15

I am trying to pull a wave/riff file from mysql and make it playable.

Below is the php which is not working and I have been told that it will not work without referencing a second page, which I want to avoid.

Anyone know of a Java app that would do it?


$query = 'SELECT `easy1_a_v`.`sound`
FROM easy1_a_v
ORDER BY `easy1_a_v`.`newlang` ASC';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());

echo "<CENTER><H1><table BORDER=\"4\" CELLPADDING=\"2\" CELLSPACING=\"2\" WIDTH=\"50%\">\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td><embed src=($col_value)
width=\"200\" height=\"240\" href=(col_value) target=\"quicktimeplayer\"></td>\n";
echo "\t</tr>\n";
echo "</table></H1></CENTER>\n";


<Big empty space where the audio player icon would normally be>...


...<a lot of RIFF (BLOB from mysql) code>...

...ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ) width="200" height="240" href=(col_value) target="quicktimeplayer">

Thanx, Alan


It looks like you are new here. If you want to get involved, click on Join below!