[TYPO3-german] Ausführliche DB Abfragen für Extension

cool_coders at web.de cool_coders at web.de
Thu Nov 22 13:47:28 CET 2007


hi
bei der ext ajax_search werden leftjoins verwendet
siehe 
http://typo3.org/extensions/repository/view/mh_ajaxsearch/0.8.1/info/pi1%252Fclass.tx_mhajaxsearch_pi1.php/
am besten installieren und debug einbauen dann siehste die komplette db 
abfrage
z.b. sieht die fertige db-abfrage mit mysql_query so aus (ist die alte 
ajax_search)
SELECT pages.uid AS pid, pages.title AS title, tt_content.header AS s0, 
tt_content.bodytext AS s1, tt_content.altText AS s2 FROM pages LEFT JOIN 
tt_content ON pages.uid = tt_content.pid WHERE pages.uid IN 
(6,20,21,23,24,5,10,9,8,7,28,31,30,33,4,13,12,11,3,2,22,19,14,26,29,32,34,1) 
AND ((tt_content.header LIKE "%j%" ) OR (tt_content.bodytext LIKE "%j%" 
) OR (tt_content.altText LIKE "%j%" )) GROUP BY pages.uid ORDER BY 
pages.uid ASC
gruß niels
> Hallo liebe Liste
>
>  
>
> Hilfe ich versuche mich an einer ersten Extension und bin darin recht neu
>
>  
>
> Wie mache ich eine ausführende DB Abfrage mit 
>
> $res=$GLOBALS['TYPO3_DB']->exec_SELECTquery( ….
>
>  
>
> Aus zwei Tabellen und mehr 
>
> und baue dabei LEFTJOIN ein.
>
>  
>
> Hat jemand zu DB-Abfragen mit Typo3 Beispiele oder sonst einen Tipp
>
>  
>
> Bin für Hilfe dankbar
>
>  
>
> Viele Grüße
>
>  
>
> Ulrike Bätz
> Agentur für neue Medien 
>
> Austraße 2
>
> 96450 Coburg
>
>
> Tel.: 09561 / 428 270
>
> mobil: 0170 / 291 22 34
> eMail:  <mailto:ubaetz at ubaetz.net> ubaetz at ubaetz.net
> Webseite :  <http://www.ubeatz.net/> www.ubaetz.net
>
>  
>
>  
>
> _______________________________________________
> TYPO3-german mailing list
> TYPO3-german at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-german
>
>   



More information about the TYPO3-german mailing list