DB_DataObject, complicated "Select"
| From: | ThE PhP_KiD | Date: | Mon, 02 Jun 2003 18:10:37 +0000 |
| Subject: | DB_DataObject, complicated "Select" | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-5740@lists.php.net to get a copy of this message | ||
Hi, DB_DataObjects Users...!
I've a two tables related, called
"covers", and "rel_covers_countries"
Covers
-----------------------
id cover
-----------------------
1 napoleon, 1870
2 san martin, 1820
3 garibaldi, 1420
.........
-----------------------
And...
rel_cover_countries
---------------------
id_cover id_country
---------------------
1 10
1 14
1 12
2 10
2 11
3 8
3 10
3 9
3 11
---------------------
In last table you have all countries which
covers are related.
I need to select covers, with next criterion:
(example:)
If I want to get covers which haves
id_country: 10 and 11, then database must
returns me the id_cover 2, and 3.
How can reach this result with DataObjects ?
(or with SQL).
Help me, please !!!
mac
--
...ThE PhP_KiD.