SetWhere with AliDatatableBundle

SetWhere with AliDatatableBundle

elpadrinoelpadrino Posts: 20Questions: 1Answers: 0
edited December 2013 in General
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.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    What is the AliDatatableBundle? You might be best asking its author... :-)

    Allan
  • elpadrinoelpadrino Posts: 20Questions: 1Answers: 0
    edited December 2013
    It's bundle based to your amazing datatable. I will try to ask my question to the author.

    If anyone know this bundle , don't forget me :D.
This discussion has been closed.