#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Posts
    2
    Rep Power
    0

    Query with TIMESTAMP, PHP+IBASE


    i'm having problems with this.

    ------------------

    ibase_timefmt("%m/%d/%Y %H:%M:%S", IBASE_TIMESTAMP);
    //both, with string and mktime don't work!
    $FromDate = "24/10/2003 17:50:40";
    //$FromDate = mktime (17,50,40,10,24,2003);
    $ToDate = "27/10/2003 17:50:40";
    //$ToDate = mktime (17,50,40,10,30,2003);

    $stmthistory = "select * from machine_history where (hdate >= ('$FromDate')) and (hdate <= ('$ToDate'));";

    $queryhistory = ibase_prepare($stmthistory);
    $rshistory=ibase_execute($queryhistory,$stmthistory);

    $rowhistory = ibase_fetch_row($rshistory);


    -----------------------

    this code return the error:
    Warning: ibase_fetch_row(): conversion error from string "27/10/2003 17:50:40" in ..........

    how do i make this query?
    thanks.


    Interactive Minds
    http://www.interactiveminds.com.br
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    62
    Rep Power
    12
    Try '2003-10-27 17:50:40' with simple quotes

IMN logo majestic logo threadwatch logo seochat tools logo