phpbar.de logo

Mailinglisten-Archive

[php] 2 Tabellen =?iso-8859-1?q?verkn=FCpfen?=

[php] 2 Tabellen verknüpfen

Michael Koch php_(at)_phpcenter.de
Mon, 17 Sep 2001 15:17:12 +0200


> SELECT a.shop_id, a.shop_url, b.shop_id FROM
> shop as a, shop_kategorien as b
> WHERE b.ukat1='$ukat' AND a.freigabe='1' AND a.shop_id=b.shop_id ||
> b.ukat2='$ukat' AND a.freigabe='1' AND a.shop_id=b.shop_id

Klammern helfen manchmal:

...
WHERE a.freigabe='1' AND a.shop_id=b.shop_i AND
( b.ukat1='$ukat' OR b.ukat2='$ukat' )


Gruss,
Michael
-- 
Bremische Hafenvertretung e.V.                      tel: +49 (421) 3090148
IT-Abteilung                                        fax: +49 (421) 3090150
World Trade Center                             mail: mkoch_(at)_bremen-ports.de
Birkenstrasse 15                           www: http://www.bremen-ports.de
D-28201 Bremen


php::bar PHP Wiki   -   Listenarchive