[TYPO3-english] Complex Query in Typoscript

IAmThatSTrange mtj66383 at creighton.edu
Wed Feb 23 23:27:21 CET 2011


Thanks, if this were any other customer than PR... I'd tell them to use the
recently updated pages method.  

My developer is going to see if he can do it using php that we can call with
a lib include, I'm mainly designer who knows enough typoscript to be
dangerous. 

If he doesn't do it, I'll walk it out backward in the typoscript.

Thanks!



Peter Russ wrote:
> 
> --- Original Nachricht ---
> Absender:   IAmThatSTrange
> Datum:       23.02.2011 22:16:
>> Hi all, I've been looking all over for information on how to do this in
>> Typoscript. tsref while great doesn't go into the detail for me to
>> understand where to dot the i's and cross the t's.  (syntax, usage)
>> 
>> What I'm trying to do is show the last 5 updated content element headers
>> as
>> links to those content elements on the home page (from several pages down
>> -
>> on as many subpages as necessary to get those content elements).
>> So
>> Home page (where the links to the content elements will be shown) 
>>         News
>>                Feb 2011
>>                     021811 (where the content elements are)
>>                     021611 (where the content elements are)
>>                     021411 (where the content elements are)
>>                Jan 2011
>>                     011811 (where the content elements are)
>>                     011611 (where the content elements are)
>>                     011411 (where the content elements are)
>> 
>> I only need the most recent 5 or 6 but if one page has only 3 content
>> elements, then the top 3 content elements from the next page should show.
>> 
>> I have a query that get's exactly what I want in a straight db query,
>> I've
>> just no clue how to put this into Typoscript.
>> 
>> the Query:
>> 
>> SELECT t.uid, t.pid, bodytext
>> FROM tt_content t
>> WHERE pid IN (SELECT p1.uid FROM pages p1 LEFT JOIN pages p2 ON p1.pid =
>> p2.uid where p2.pid = 17523 and p1.hidden = 0 and p1.deleted=0)
>> order by tstamp desc
>> 
>> Can anyone assist?
>> 
>> Thanks so much!
>> 
>> M
> 
> PS: alreday done similar thing. But you have to "reverse" the MySql 
> standard approach:
> 
> 1) Query internal first
> 2) With each result of first query do the external
> 
> As you can imagine: not very fast.
> Never left R&D.
> 
> Peter.
> 
> 
> 
> 
> 
> 
> -- 
> Fiat lux! Docendo discimus.
> _____________________________
> uon GbR
> 
> http://www.uon.li
> http://www.xing.com/profile/Peter_Russ
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
> 
> 

-- 
View this message in context: http://old.nabble.com/Complex-Query-in-Typoscript-tp30998902p30999431.html
Sent from the TYPO3 English mailing list archive at Nabble.com.



More information about the TYPO3-english mailing list