Ticket #894 (closed defect: fixed)

Opened 16 months ago

Last modified 10 months ago

SQL BETWEEN Condition broken

Reported by: crem0r Owned by: romanb
Priority: major Milestone:
Component: Query/Hydration Version: 2.0-DEV
Severity: Keywords:
Cc: Has Test: no
Status: Pending Core Response Has Patch: no

Description

The second question mark is missing in the SQL output and the resulting query.

$result = Doctrine_Query::create()
          ->from('Day d')
          ->where('d.date BETWEEN ? AND ?', array($beginDate, $endDate))
          ->getDql();
var_dump($result);

Output:

string ' FROM Day d WHERE d.date BETWEEN ? AND ?' (length=40)
$result = Doctrine_Query::create()
          ->from('Day d')
          ->where('d.date BETWEEN ? AND ?', array($beginDate, $endDate))
          ->getSql();
var_dump($result);

Ouput:

string 'SELECT t.id AS t__id, t.date AS t__date, t.begintime AS t__begintime, t.endtime AS t__endtime, t.workingtime AS t__workingtime, t.comment AS t__comment, t.user_id AS t__user_id FROM test_arbeitszeitkonto_days t WHERE (t.date BETWEEN ? AND )' (length=240)

==> The second question mark is missing in the SQL output and the resulting query.

Change History

Changed 16 months ago by jwage

  • owner changed from zYne- to romanb
  • version changed from 0.10 to Trunk
  • milestone changed from 0.10.4 to 2.0.0

Changed 11 months ago by guilhermeblanco

  • status changed from new to closed
  • resolution set to fixed
  • has_patch unset
  • mystatus set to Pending Core Response
  • has_test unset

Fixed in trunk

Changed 11 months ago by guilhermeblanco

  • milestone changed from 2.0.0 to 1.0.0-RC1

Fixed in 1.0-RC1 too. Ticket was added and fixed, can't find which revision.

Changed 10 months ago by anonymous

  • milestone New deleted

Milestone New deleted

Note: See TracTickets for help on using tickets.