[TYPO3-mvc] extbase query select only specific table columns
Domi
djgarms at gmail.com
Tue Apr 9 14:47:22 CEST 2013
On 04/09/2013 03:09 PM, Philipp wrote:
> I dont think so, but if you really need those 2 columns only in a
> resultarray you may send a raw statement. No need for a mapping process
> here if you just handle one string and one integer.
Hi Philipp,
I did this now:
$query = $this->createQuery();
$selectQuery = 'SELECT id,name FROM mytable'
$query->statement($selectQuery);
return $query->execute()->toArray();
Now my result is still an array of all rows, maybe because of toArray()?
How can I get an array from my select without all unnecessary columns?
Thanks,
Dominic
More information about the TYPO3-project-typo3v4mvc
mailing list