It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Java Forum

Play a Mysql Blob (wave) file?

Play a Mysql Blob (wave) file?

Postby estes53 on Thu May 17, 2007 4:49 pm

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?

Code-

$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";

Result-

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

...��WAVEfmt���U�[1]�À]...

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

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

Thanx, Alan
estes53
 
Posts: 2
Joined: Thu May 17, 2007 1:58 pm

Who is online

Users browsing this forum: No registered users and 1 guest