I have a table in mysql that has data displayed on a web page, but currently it shows all data. I would like to be able to limit the data displayed to only the next 30 days, including today. I have just enough mysql and php experience to do simple things and I tried to use google which returned a lot of information and examples that are hard for me to understand given my limited mysql and php knowledge. Here is what I am currently using and the web site for a live example is here
// select all the shows in the database
$result = mysql_query("select $database_table.show_id, $database_table.month, $database_table.day, $database_table.year, $database_table.location, $database_table.details, $database_table.venue, $database_table.artist_id, $database_table_artists.artist_id, $database_table_artists.artist_name
from $database_table, $database_table_artists
where $database_table.artist_id = $database_table_artists.artist_id
order by year, month, day, artist_name",$db)
or die_now("<h2>Could not select shows</h2>"
// output the current shows
echo("<div class='box'><center>Upcoming Shows</center>\n</div>\n<div class='box'>\n"
echo("<table border='1' width='100%'>\n"
echo("\t<tr>\n\t\t<td width=20%>artist</td>\n\t\t<td width=10%>date</td>\n\t\t<td width=20%>venue</td>\n\t\t</tr>\n"
while($row = mysql_fetch_array($result)) {
$the_artist = $row["artist_name"];
$the_month = $row["month"];
$the_day = $row["day"];
$the_venue = $row["venue"];
// shows
echo("\t<tr>\n\t\t<td>$the_artist</td>\t\t<td>$the_month" . "/" . "$the_day" . "</td>\n"
echo("\t\t<td>" . "$the_venue" . "</td>\n"
// select all the shows in the database
$result = mysql_query("select $database_table.show_id, $database_table.month, $database_table.day, $database_table.year, $database_table.location, $database_table.details, $database_table.venue, $database_table.artist_id, $database_table_artists.artist_id, $database_table_artists.artist_name
from $database_table, $database_table_artists
where $database_table.artist_id = $database_table_artists.artist_id
order by year, month, day, artist_name",$db)
or die_now("<h2>Could not select shows</h2>"
// output the current shows
echo("<div class='box'><center>Upcoming Shows</center>\n</div>\n<div class='box'>\n"
echo("<table border='1' width='100%'>\n"
echo("\t<tr>\n\t\t<td width=20%>artist</td>\n\t\t<td width=10%>date</td>\n\t\t<td width=20%>venue</td>\n\t\t</tr>\n"
while($row = mysql_fetch_array($result)) {
$the_artist = $row["artist_name"];
$the_month = $row["month"];
$the_day = $row["day"];
$the_venue = $row["venue"];
// shows
echo("\t<tr>\n\t\t<td>$the_artist</td>\t\t<td>$the_month" . "/" . "$the_day" . "</td>\n"
echo("\t\t<td>" . "$the_venue" . "</td>\n"