[TYPO3-dev] SQL - GROUP BY - returns false
Kay Strobach
typo3 at kay-strobach.de
Tue Aug 28 15:26:00 CEST 2012
Hi Tomas,
why do you escape the intval(pid) with quotes and don't use intval?
Regards
Kay
Am 28.08.2012 09:55, schrieb Tomas Norre Mikkelsen:
> Hi,
>
> When using this SQL:
>
> $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
> 'uid,question,reply,full_name,email', // SELECT
> $this->dbExportTable, // FROM
> '1=1 AND pid ="' . $pid . '"', // WHERE
> 'question,email,reply', // GROUP BY
> '', // ORDER BY
> ''// LIMIT
> );
>
> $result is false, but if I echo the sql-statement:
> SELECT uid,question,reply,full_name,email FROM tx_nicompetition_reply
> WHERE 1=1 AND pid ="61" GROUP BY question,email,reply
>
> And paste it into fx. phpmyadmin, it works fine, any hints on the problem?
>
--
http://www.kay-strobach.de - Open Source Rocks
TYPO3 .... inspiring people to share!
Get involved: http://typo3.org
Answer was useful - feel free to donate:
-
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KPM9NAV73VDF2
- https://flattr.com/profile/kaystrobach
More information about the TYPO3-dev
mailing list