I got something else to work same thing basically just a little different
Now for the Story Part of this fantastic Voyage! here's the code
<?php
ini_set("display_errors", "1");
error_reporting(E_ALL);
$page_title = "Battle of the Bands";
require("../listingsfunc.php");
dbconnect();
pagecount($page_title);
$table_name = "battle_bands_2006";
$sql ="SELECT id, DATE_FORMAT(`date`,'%M-%d-%Y') date, band_name, time, genre, CASE isnull(web_site)
WHEN 1 then 'No Web Site'
ELSE CASE rtrim(web_site)
WHEN '' then 'No Web Site'
ELSE CONCAT('<a href=',web_site,'>View Website</a>')
END END web_site, e_mail
FROM $table_name ORDER BY date, time";
$result = mysql_query($sql, $connection) or die (mysql_error());
$rock_block = "<table class=\"gbook\" width=\"70%\" align=\"center\" cellspacing=\"0\">";
//While loop will create an array called $row
while ($row = mysql_fetch_array($result)) {
// get individual elements from the array
$id = ($row['id']);
$date = ($row['date']);
$band_name = ($row['band_name']);
$time = ($row['time']);
$genre = ($row['genre']);
$web_site = ($row['web_site']);
$e_mail = ($row['e_mail']);
// // // // // // // // // // // // // // // // // //
// // // // // // // // // // // // // // // // // //
// // // // // // // // // // // // // // // // // //
// Section I am conserned with right now // // // //
// // // // // // // // // // // // // // // // // //
$table_name2 = "bob_storys";
$sql2 ="SELECT CASE isnull(id)
WHEN 1 then 'Story (0)'
ELSE CASE rtrim(id)
WHEN '' then 'Story (0)'
ELSE CONCAT('<a href=http://www.eriescene.com/battle_bands_sherlocks/band_battle_.php?story=',id,'>View story ()</a>')
END END id, band_name FROM $table_name2 WHERE $band_name = band";
$result2 = mysql_query($sql2, $connection) or die (mysql_error());
$num = mysql_num_rows($sql2, $connection) or die (mysql_error());
while ($row = mysql_fetch_array($result2)) {
$story = ($row['id']);
// // // // // // // // // // // // // // // // // //
// // // // // // // // // // // // // // // // // //
// // // // // // // // // // // // // // // // // //
$rock_block .= "
<tr class=\"gb_bar\">
<td colspan=\"2\"><span class=\"title_bar\">$band_name <br/>Date of Show: $date</span></td>
</tr>
<tr>
<td colspan=\"2\" class=\"msgblock\">Time on Stage: $time</td>
</tr>
<tr>
<td colspan=\"2\" class=\"msgblock\">Genre: $genre</td>
</tr>
<tr>
<td colspan=\"2\" class=\"msgblock\">Band E-Mail: $e_mail</td>
</tr>
<tr>
<td colspan=\"2\" class=\"msgbottom\">
<table width=\"100%\">
<tr>
<td><span class=\"web\"><div align=\"center\">$web_site</div></span></td><td><span class=\"web\"><div align=\"center\">$story</div></span></td>
</tr>
</table>
</td>
</tr>";
}
}
// Finishing touches on the Rock block
$rock_block .= "</table>";
bandlinks($connection);
mysql_close($connection);
?>
the story part of this is outlined with comment tags. Also remeber I am only trying to get a Link to the Story with the band field matching the $band_name Right now I get an SQL error:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Story = band' at line 6