[TYPO3-dev] do I need reverse relation?
Rudy Gnodde
gnodde.rudy at wag.nl
Fri Oct 13 12:31:09 CEST 2006
Hello Bartosz,
I think what you're looking for can be done with the
exec_SELECT_mm_query function (if I understand you correctly). More
about it can be found at
http://typo3.org/fileadmin/typo3api-4.0.0/de/d07/classt3lib__DB.html
Regards,
Rudy Gnodde
WIND Internet
http://www.windinternet.nl
> -----Oorspronkelijk bericht-----
> Van: typo3-dev-bounces at lists.netfielders.de
> [mailto:typo3-dev-bounces at lists.netfielders.de] Namens
> Bartosz Aninowski
> Verzonden: vrijdag 13 oktober 2006 12:16
> Aan: typo3-dev at lists.netfielders.de
> Onderwerp: [TYPO3-dev] do I need reverse relation?
>
> Hi list
> This is my scenario.
> I have table with products and mm relations to shops tables
> where user can buy these products.
> If BE user adds new product he select also shops where
> products is on stock..
> I want to show all shops where particular product is available.
> I've tried this code but I think this is wrong. This query
> duplicates items on page.
>
>
> //$this->piVars['prodUid'] is uid of clicked product
>
> if($this->piVars['prodUid']) $mm_cat =
> array('table'=>'tx_bapogromcy_products','mmtable'=>'tx_bapogro
> mcy_products_shops_mm');
> $res =
> $this->pi_exec_query('tx_bapogromcy_shop',0,$where,$mm_cat,'','','');
> $count =
> $this->pi_exec_query('tx_bapogromcy_shop',1,$where,$mm_cat,'','','');
>
> I think I need select like this uid_foreign =
> tx_bapogromcy_shop.uid and tx_bapogromcy_products.uid =
> prodUid but I could be wrong :)
>
> Thanks in advance
>
>
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
>
More information about the TYPO3-dev
mailing list