[FLOW3-general] statement method (sql query)
"Christian Müller (FLOW3 Team)"
christian.mueller at typo3.org
Thu Sep 6 10:02:17 CEST 2012
Hi,
$query->statement() is from extbase I think? You cannot do that in FLOW3
as our persistence layer is totally different. You can use DQL queries
which should help doing what you want to do. Take a look at the TYPO3CR
NodeRepository to see some examples. And lookup the details in the
doctrine documentation.
Cheers,
Christian
On 06/09/12 09:36, Phallin Hor wrote:
> 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.
More information about the FLOW3-general
mailing list