Couple of comments:
1. What's with the $artist = "artist"; echo $mytable[$artist]; bit?
This really doesn't seem to gain you much.
2. Descriptive variable names are a Good Thing(tm).
3. Prettyprinting "
4. Why are the tables in different databases to begin with?
5. Don't pull any more than you need from the database.
Try:
<?php
// expects $band as parameter
mysql_connect("localhost","username","password")
or die ("Could not connect to MySQL!");
$band_result = mysql_query(
"SELECT nospaces_bands, band_bands, id, email "
."FROM almavale_board.bands"
."WHERE nospaces_bands = '$band' "
)
or die("Error in band query");
while ($band_row = mysql_fetch_array($band_result)) {
printBand($band_row);
$shows_result = mysql_query(
"SELECT artistname, venue, time "
."FROM almavale_board.shows "
."WHERE artistname = '".$band_row["band_bands"]."'"
)
or die("Error in show query");
while($show_row = mysql_fetch_array($show_result))
printShow($show_row);
$release_result = mysql_query(
"SELECT bandname, albumtitle, email "
."FROM almavale_releases.releases "
."WHERE bandname = '".$band_row["band_bands"]."'"
)
or die("Error in release query");
while($release_row = mysql_fetch_array($release_result))
printRelease($release_row);
}
?>
... and you can implement printBand, printShow, and printRelease as you
like.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]