Jump to content

one bad monkey

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

one bad monkey's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks a lot, guys! I'm heading off to lunch, but will get that moving when I get back.
  2. I believe so. I read a couple sites about doing this sort of thing, and figured keeping it like that would be the easiest way to go.
  3. My apologies if this has been answered before; I haven't found it. I'm working on making a gig schedule for my site, where I can just add everything into mysql and have it show up. That part I have taken care of, and it works just fine. Here's what I'm stumped at. I would like the php to move any of the performances that have already happened to a spot below the "Upcoming Performances" section, entitled "Previous Performances." This is the code thus far. $sql = mysql_query ("SELECT * FROM `Schedule` ORDER BY day ASC") or die (mysql_error ()); echo "<table width=100%>" . "<br>" . "<tr><td width=15%>Date</td>" . "<td width=10%>Time</td>" . "<td width=20%>Venue</td>" . "<td width=20%>Performance</td>" . "<td width=10%>Price</td>" . "<td width=25%>Additional Information</td></tr>"; while ($row = mysql_fetch_assoc ($sql)) { echo "<tr><td>" . date("D, F j", strtotime($row['day'])) . "</td>" . "<td>" . $row['time'] . "</td>" . "<td>" . $row['venue'] . "</td>" . "<td>" . $row['show'] . "</td>" . "<td>" . $row['price'] . "</td>" . "<td>" . $row['info'] . "</td></tr>"; } echo "</table>"; My thought is that I need to add in the line for the mysql_query something to the effect of WHERE day >= "current date" for the first one, and then repeat this code below it, with a WHERE day < "current date" function. Am I on the right path? Any comments are appreciated.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.