Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member towerboy's Avatar
    Join Date
    Dec 2003
    Location
    Stevens Point, Wisconsin
    Posts
    28
    Member #
    4293
    Hey,

    I'm a bit stuck on a latest events section I made for the main page of a web site I work on. It is designed to show the next 5 upcoming events from a calendar system I also made. It was working good up to a week ago when I noticed it is only showing dates up to the end of 2005. It doesn't show anything posted for 2006 for some reason. I have tried a couple of things and it has not worked. Here is what I am using to post the information:

    PHP Code:
    <?php

    //Connect to the Database
    $db mysql_connect("localhost""username""password");
    mysql_select_db("dbname"$db);

    $today date("m/d/Y");

    $result mysql_query("SELECT * FROM schedule WHERE date>='$today' ORDER BY 'date' ASC LIMIT 0, 5") or die ("Invalid query: SELECT");
    while (
    $data mysql_fetch_array($result))

    extract($data);
    $n++;

    print 
    "<img src=\"images/square.gif\" width=\"10\" height=\"8\" border=\"0\"><a href=\"schedule.php?view=1&id=$id\" onMouseOver=\"window.status='$date - $name'; return true\" onMouseOut=\"window.status=' '\">$mm/$dd/$yy - $name</a><br>
    <p>
    "
    ;
    }

    ?>
    If anyone has any ideas, I would appreciate it.

    Thanks!
    :lick: I reject your reality and substitute my own.

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Well, first off, are you sure you have dates that happen in 2006?
    Secondly, modify your query and select all rows (or have a looksee in a tool like phpMyAdmin) and see your rows.

    Other than that you could use BETWEEN to return rows between 2 dates.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:51 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com