Hi Guys,
Still can't figure this one out. This is my php script at the top of the band_profile.php page:
<?
$link = mysql_connect('localhost', 'username', 'password');
mysql_select_db('typhoon');
$query = <<< EOF
SELECT band_name, picture_thumb, members, biography, genre FROM bands
LEFT JOIN genre ON genre.genre_id=bands.genre_id
WHERE band_id = $id
EOF;
$row = mysql_fetch_array(mysql_query($query));
?>
Further down i have this php script to display the genre data:
<?=$row['genre']?>
Can anyone tell me why this won't bring up the genre data?
My tables are:
CREATE TABLE bands (
band_id int(10) unsigned NOT NULL auto_increment,
genre_id int(10) unsigned NOT NULL DEFAULT '0' ,
band_name varchar(100) NOT NULL DEFAULT '' ,
picture varchar(100) ,
picture_thumb varchar(100) ,
members text ,
biography text ,
profile text ,
PRIMARY KEY (band_id)
);
CREATE TABLE genre (
genre_id int(10) unsigned NOT NULL auto_increment,
genre varchar(50) NOT NULL DEFAULT '' ,
PRIMARY KEY (genre_id)
);
Cheers,
micmac