Matt Nigh schrieb:
> Matt Nigh
>
> <?php
> $link = mysql_connect("localhost","username","password");
> if(!$link) die ("Could not connect to MySQL!");
> mysql_select_db("almavale_board",$link);
> if (!isset($band)) {
> die("No artist specified.");
> }
> $sql = "select * from bands where (nospaces_bands = '$band')";
> $result = mysql_query($sql);
> if (mysql_num_rows($result) <= 0) {
> die("Sorry, there was no artist found by that name.");
> }
> if (!$my_row = mysql_fetch_array($result)) {
> die("Please specify an artist.");
> }
> $band = "nospaces_bands";
> $band_spaces = "band_bands";
> $id = "id";
> $email = "email";
> echo "<b>band name without spaces:</b> " . $my_row["$band"];
> echo "<br><b>band name with spaces:</b> " . $my_row["$band_spaces"];
> echo "<br><b>id:</b> " . $my_row["$id"];
> echo "<br><b>email address:</b> " . $my_row[$email];
>
> $band_spaces = $artist;
>
> mysql_select_db("almavale_board",$link);
> $sql_01 = "select * from shows where (artistname = '$artist')";
> $result_01 = mysql_query($sql_01);
> if (mysql_num_rows($result_01) <= 0) {
> die("<br><br>No shows found.");
> }
> $my_row_01 = mysql_fetch_array($result_01);
>
> $artist = "artistname";
> $venue = "venue";
> $time = "time";
> echo "<br><br><hr><b>artist name with spaces:</b> " . $my_row_01["$artist"];
> echo "<br><b>venue:</b> " . $my_row_01["$venue"];
> echo "<br><b>time:</b> " . $my_row_01["$time"];
>
> $artist = $band_name;
>
> mysql_select_db("almavale_releases",$link);
> $sql_02 = "select * from releases where (bandname = '$band_name')";
> $result_02 = mysql_query($sql_02);
> if (mysql_num_rows($result_02) <= 0) {
> die("No releases found.");
> }
> $my_row_02 = mysql_fetch_array($result);
> $band_name = "bandname";
> $albumtitle = "albumtitle";
> $email = "email";
> echo "<br><br><hr><b>artist name with spaces from releases:</b> " .
>$my_row_02["$artist"];
> echo "<br><b>album name:</b> " . $my_row_02["$albumtitle"];
> echo "<br><b>album code:</b> " . $my_row_02["$albumcode"];
>
> mysql_close($link);
> ?>
What do you exactly want to do?
And what is that?
$band = "nospaces_bands";
$band_spaces = "band_bands";
$id = "id";
$email = "email";
Why don't you do this:
echo "<b>band name without spaces:</b> " . $my_row["band"];
echo "<br><b>band name with spaces:</b> " . $my_row["band_spaces"];
echo "<br><b>id:</b> " . $my_row["id"];
echo "<br><b>email address:</b> " . $my_row[email];
Greetings
Kobi
--
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]