SetWhere with AliDatatableBundle
SetWhere with AliDatatableBundle
Hi everyone,
I am trying to modify my request with setWhere but i am confronted at an enigma.
When setWhere is (first method) :
[code]
->setWhere(
's.dateFacture LIKE :anneeMois', array('anneeMois' => '2013-12%')
)
[/code]
That's working but where setWhere is (second method) :
[code]
$date = new \DateTime;
$month= $date->format('m');
$year= $date->format('Y');
$value= $year. "-" . $month. "%"; // = "2013-12%"
->setWhere(
's.dateFacture LIKE :anneeMois', array('anneeMois' => $value)
)
[/code]
That doesn't working.
I have compared the first and second choice and it's the same type (with gettype) and value BUT only the first method works.
Any help is welcome. Thanks.
I am trying to modify my request with setWhere but i am confronted at an enigma.
When setWhere is (first method) :
[code]
->setWhere(
's.dateFacture LIKE :anneeMois', array('anneeMois' => '2013-12%')
)
[/code]
That's working but where setWhere is (second method) :
[code]
$date = new \DateTime;
$month= $date->format('m');
$year= $date->format('Y');
$value= $year. "-" . $month. "%"; // = "2013-12%"
->setWhere(
's.dateFacture LIKE :anneeMois', array('anneeMois' => $value)
)
[/code]
That doesn't working.
I have compared the first and second choice and it's the same type (with gettype) and value BUT only the first method works.
Any help is welcome. Thanks.
This discussion has been closed.
Replies
Allan
If anyone know this bundle , don't forget me :D.