Hi

I want to ask you something i have a table called resolved the date when my tickets were open , closed and finished m but i want to make a page that will only list the closed tickets for only one day , they should only appear for one day only after they have been closed so pls help me with tips if its possible to do dat

    http://us2.php.net/date

    you could call the close date from the MYSQL to a php variable then check todays date.

    have $year1 be year ticket closed, $month1 be month ticket closed, $day1 be day ticket closed

    $day1++;
    
    if ($year1 == $year2)
    {
    if ($month1 == $month2)
    {
    if ($day1 >= $day2)
    {
    //Show ticket here
    }
    }
    else
    { 
    //ticket doesnt show
    }
    }
    

    Thats how i would structure it. You can also just use javascript

      Perhaps you could reword your question, as it is hard to discern what exactly you are asking for.

      In the meantime, check out http://us2.php.net/date.

      It has a lot of useful examples for comparing dates, such as this:

      $tomorrow  = mktime(0, 0, 0, date("m")  , date("d")+1, date("Y"));

      So, perhaps you can do something like this would help:

      $yesterday = mktime(0, 0, 0, date("m"), date("d")-1, date("Y"));
      $yesterday = date("Y-m-d", $yesterday);
      "SELECT * FROM resolved WHERE closed > " . $yesterday
      

        thank you im going through the example now this is what i want

          You can also do it with MySQL only:

          SELECT * FROM Resolved WHERE closed = DATE_SUB(CURDATE(), INTERVAL 1 DAY);
            Write a Reply...