[FLOW3-general] statement method (sql query)
Jutta Dobner
juttadobner at gmail.com
Thu Sep 6 09:58:32 CEST 2012
You must extend from \FLOW3\Persistence|Doctrine\Repository then you can use DQL
try
$query = $this->entityManager->createQuery(....);
return $query->execute();
Am 06.09.2012 um 09:36 schrieb Phallin Hor:
> On 09/06/2012 01:07 PM, Robin Lehrmann wrote:
>>
>>>
>>> And I also try
>>>
>>> public function findCustomerGroupByName() {
>>> $query = $this->createQuery();
>>> $query->statement('SELECT * FROM employees GROUP BY name');
>>> return $query->execute();
>>> }
>>>
>> I think:
>>
>> public function findCustomerGroupByName() {
>> $query = $this->createQuery('SELECT * FROM employees GROUP BY
>> name');
>> return $query->execute();
>> }
>
> Now this statement cannot help me because the string in createQuery doesn't work. createQuery ignores all string in (). So if I write
> $query = $this->createQuery('sdfsdfsdf'); it also work and return the same result as select * from employees.
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
More information about the FLOW3-general
mailing list