Hello everyone Im new to this forum as well as new to MySQL.
Ive read countless forums about using blobs and referencing.

Im the type of person who learns by seeing. I kinda understand the referencing but I would like to see an example if I am doing it correctly.

My connection.php is located here : http://elixclothing.com/connection.php
The site I am trying to mimic is : http://opus1.o1engine.com/

The look of the site is completely easy to create on my own. Im trying to knock out the database information first. Im stuck on getting an audio file to play. I have my audio file located in /audio/sample1.mp3

As for what I have been reading would I have to create another table with :
ID Location
(auto in) /audio/sample1.mp3

If so how would that link to the speaker image in my table? As well as play the correct track within my previous table?

Any help would be great.

- Sam

8 Years
Discussion Span
Last Post by haywars

I have had some progress but I am stuck again...

I added a new column named "audiolocation" for this example the file is located in "/audio/track1.mp3" so I made that column "TEXT" and inserted that information.

Heres the code for my current page. The code for the audiolocation i think is

mysql_connect("localhost", "*****", "*****") or die(mysql_error());
echo "Connected to MySQL<br /><hr />";
mysql_select_db("elixclot_music") or die(mysql_error());
echo "Connected to Database<br /><hr />";
$query = "SELECT * FROM tracks";
$result = mysql_query($query) or die(mysql_error());
while($line = mysql_fetch_array($result)) {
echo "<tr>"; 
echo "<td align='center'>".$line[cue_code]."</td>"; 
echo "<td align='center'>".$line[cue_title]."</td>"; 
echo "<td align='center'>".$line[cue_description]."</td>"; 
echo "<td align='center'>".$line[time]."</td>";
echo "<td align='center'>"<a href='<?php echo $audiolocation; ?'>"<img src=\"http://opus1.o1engine.com/img/speaker_dark.gif\" border=0>"</a>;
echo "</tr>"; 


After adding the page seems to fail...I'm guessing my quotes are off but cant seem to find where it goes wrong....

Edited by haywars: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.