Jump to content

webezine

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

webezine's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Shocker if this works I LOVE YA!
  2. Hi i need some help on somethign liek this too! I need to do a search of a database from todays date for all events within the next 2 days. Any ideas?
  3. Hi all. Really need some help with this! I have an events database where event details are stored. The date is stored in teh format yyyy/mm/dd. I have a script that reads all events from the database and echos them out onto a new sheet. Thing is I need it only to display 2 weeks worth of event... meaning showing all events taht take ;place within the next 2 weeks from the curretn date. The current script i ahve is: <?php $conn = mysql_connect(); $counter =0; mysql_select_db(""); $result = mysql_query("SELECT * FROM events ORDER BY eventdate"); while($row = mysql_fetch_array($result)) {$counter=$counter+1;} if ($counter>0){ echo"<p> The following event take place within the next 2 weeks:</p><table>"; echo "<tr><td colspan='4'><hr></hr></td></tr>"; $result = mysql_query("SELECT * FROM events ORDER BY Eventdate"); while($row = mysql_fetch_array($result)) { echo "<tr><td><em>Name: </em> $row[name]</td>"; echo "<td><em>Date (yyyy-mm-dd): </em> $row[eventdate]</td>"; echo "<td><em>Tickets: </em> $row[maxtickets]</td>"; echo "<td><em>Price: </em> $row[price]</td>"; echo "</tr><tr><td colspan='1'><em>Tickets remaining: </em> $row[remintickets]</td>"; echo "<td colspan='3'><em>Description: </em> $row[description]</td></tr>"; echo "<tr><td colspan='4'><hr></hr></td></tr>"; $counter=$counter+1; } This works but just need some help to load only 2 weeks worth of stuff. PLEASE HELP! If you have any ideas please e-mail me @ webezine 'at' hotmail.co.uk
×
×
  • 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.