[Typo3-dev] Building MySQL queries with selectConf array
Sacha Vorbeck
sachav at gmx.net
Thu Aug 28 23:19:20 CEST 2003
Hi,
in the news and faq plugin MySQL queries are glued together with an
array which is then passed to a function.
The array is filled like this:
$selectConf["where"] = "1=1 ".$where;
$selectConf["orderBy"] = "title";
$selectConf["where"].=" AND category=".$this->catExclusive;
and is then passed to a function:
$query = $this->cObj->getQuery("tx_faq_faq",$selectConf);
The only chance I see adding a limit to the query is:
$query .= " LIMIT 0,5";
Is there another way? Maybe something like $selectConf["limit"] = "0,5";
(which doesn`t work).
It seems that the getQuery() function always selects all fields. Is
there a way to restrict the query only to certain fields of a table?
I wanted to take a look at the function getQuery() but I couldn`t find
it. I still don`t understand what the reference to $this-cObj really means.
--
thank you - all the best,
Sacha
More information about the TYPO3-dev
mailing list