i'm sorry-- i feel like a leech posting every five minutes, but i'm having a difficult time finding existing threads which match my problems. i am trying the search first. honest!. :bemused:
anyway...
please take a look at this. this thing was working before i added the "second part", that is-- when i left it to only display this
$display_bloack = "<ul><li>$artist_id1</li>
<li>$artist_id2</li>
<li>$artist_id3</li>"
but those numbers were no fun to look at on my html output page, even though the info that they represented was apparently accurate. so, i decided what i needed was to use those ID numbers to call the related VARCHAR strings from the db Table, which in this case are the "Artist Names". but, now i'm getting the error which is the title of this topic. here's my code. i'll indicate the "new" part which is causing the error.
oh, and i also added: global $concerts; which i'm not sure if i need that there or not. i need to brush up on my globals / superglobals. i guess it doesn't hurt to have it there... or does it?
// GET CONCERTS INFO
$get_master = "select show_date
from concerts where concert_id = $_POST[sel_id]";
$get_master_res = mysql_query($get_master);
$show_date = stripslashes(mysql_result($get_master_res,
0,'show_date'));
$display_block = "<h1>Showing Record for $show_date</h1>";
// GET ALL ARTISTS FOR CONCERT DATE
$get_artist = "select artist_id1, artist_id2, artist_id3 from concerts where concert_id = $_POST[sel_id]";
$get_artist_res = mysql_query($get_artist);
if (mysql_num_rows($get_artist_res) > 0) {
$display_block .= "<p><strong>Concert Scheduled for ".$show_date.":</strong><br>
<ul>";
global $concerts;
while ($concerts = mysql_fetch_array($get_artist_res)) {
$artist_id1 = $concerts['artist_id1'];
$artist_id2 = $concerts['artist_id2'];
$artist_id3 = $concerts['artist_id3'];
}
$display_block .= "</ul>";
here is the "new part" -- and my error is caused, according to PHP error reporting, by this very next line:
$artist1_name = "select artist_name from artist_info where artist_id = $concerts['artist_id1']";
$artist2_name = "select artist_name from artist_info where artist_id = $concerts['artist_id2']";
$artist3_name = "select artist_name from artist_info where artist_id = $concerts['artist_id3']";
$artist1_res = mysql_query($artist1_name);
$artist2_res = mysql_query($artist2_name);
$artist3_res = mysql_query($artist3_name);
$display_block .= "<li>$artist1_res</li>
<li>$artist2_res</li>
<li>$artist3_res</li>";
}
it's probably something really silly, right.
well, i'm at least happy that i'm making a li'l bit of progress on this app! soon as i iron out the bugs, is it okay to post an off-site link for someone here to look at? i didn't know if that is common practice or what. i realize y'all probably don't have a whole lot of time for that sort of thing...
😉