Doctrine 1
  1. Doctrine 1
  2. DC-86

NOW() doesn't work in Sqlite driver

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.4
    • Fix Version/s: 1.2.0-ALPHA3
    • Component/s: Connection
    • Labels:
      None
    • Environment:
      sqlite

      Description

      The problem is concerned about sqlite driver. Currently in every occurence of "NOW()" in where clause PDO substitutes result of PHP time() function. Here is a cause:

                  $this->dbh->sqliteCreateFunction('now', 'time', 0);
      

      Unfortunatelly, sqlite expects a datetime value rather then integer timestamp.

      In result, every occurence of 'now()' in where clause is treated as '0'.

      I have prepared a testcase and patch.

      1. DC86.patch
        2 kB
        Jacek Dębowczyk
      2. DC86TestCase.php
        3 kB
        Jacek Dębowczyk

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Jacek Dębowczyk
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: