Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Query Syntax Problem

0 views
Skip to first unread message

Piotr Usewicz

unread,
Aug 3, 2004, 7:37:31 AM8/3/04
to
Hi

I've got a little problem here. I wonder is there any way of creating 1
query to database, instead of many ones.

I've got 3 tables, eg.

Products: products_id, products_manufacturer_id, products_category_id

Manufacturers: manufacturer_id, manufacturer_name

Categories: category_id, category_name

What I'd like to achieve is to select Manufacturer id + name where
products category is some category_id eg. 2.

Question is: HOW?

--
Regards,
Piotr Usewicz

=================
www.lop.esol.pl
pi...@lop.esol.pl
+48 880 704 926

Piotr Usewicz - Your Favourite PHP Developer

steve

unread,
Aug 3, 2004, 7:38:10 PM8/3/04
to
"Piotr Usewicz" wrote:
> Hi
>
> I’ve got a little problem here. I wonder is there any way of
> creating 1
> query to database, instead of many ones.
>
> I’ve got 3 tables, eg.
>
> Products: products_id, products_manufacturer_id,
products_category_id
>
> Manufacturers: manufacturer_id, manufacturer_name
>
> Categories: category_id, category_name
>
> What I’d like to achieve is to select Manufacturer id + name
> where
> products category is some category_id eg. 2.
>
> Question is: HOW?
>

query on join tables: http://dev.mysql.com/doc/mysql/en/JOIN.html

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/PHP-SQL-Query-Syntax-Problem-ftopict135922.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=454899

0 new messages