Re: Multi Table Query Help

From: Steve Edwards (racquetballer_at_hotmail.com)
Date: 12/20/04


Date: Mon, 20 Dec 2004 09:02:07 -0800


"Pedro Graca" <hexkid@dodgeit.com> wrote in message
news:slrncsde53.eqs.hexkid@ID-203069.user.uni-berlin.de...
> Steve wrote:
> > The two tables are product and vendor. A vendor can be a manufacturer,
> > distributor, or both. This is indicated via the manufacturer_YN and
> > distributor_YN fields in the vendor table, and vendor_id is an
> > auto_number field. In the product table, there is a manufacturer_id and
> > a distributor_id field, and these are linked to the vendor.vendor_id
> > field.
> >
> > What I would like to do is for each product, display the name, short
> > description (both fields in product table), manufacturer, and
> > distributor. The problem I'm having is writing a query to get all this
> > info at once so it can be displayed.
>
> Please post your tables definition (use the output of the DESCRIBE
> command).

mysql> describe vendor
-> ;
+-------------------+-----------------------------
---+
 Field | Type
          |
-----------------+---------------
----------+
 vendor_id | mediumint(5) u
increment |
 name | varchar(50)
          |
 address | varchar(30)
          |
 city | varchar(20)
          |
 state | char(2)
          |
 zip | mediumint(5)
          |
 phone | varchar(10)
          |
 fax | varchar(10)
          |
 email | varchar(50)
          |
 url | varchar(80)
          |
 contact_name | varchar(30)
          |
 acct_num | varchar(22)
          |
 distributor_YN | enum('Y','N')
          |
 manufacturer_YN | enum('Y','N')

mysql> describe product
    -> ;
+-------------------+-----------------------------
---+
| Field | Type
ra |
+-------------------+-----------------------------
---+
| product_sku | bigint(9) unsigned zerofill
   |
| subcategory2 | varchar(30)
   |
| product_name | varchar(50)
   |
| short_description | varchar(80)
   |
| long_description | text
   |
| picture_name | varchar(16)
   |
| manufacturer_id | mediumint(5) unsigned
   |
| distributor_id | mediumint(5) unsigned

Thanks.

Steve



Relevant Pages

  • Re: A tale of two vendors, Pinball Life and PBresource
    ... I ordered a ring kit as part of a $160 order from pbresourse. ... was short 3 twenty cent post rubbers. ... to me with an invoice....shitty vendor. ... I know Steve is greatly loved here so flame suit is on and firmly ...
    (rec.games.pinball)
  • Re: A tale of two vendors, Pinball Life and PBresource
    ... Nice Guy" for Steve. ... was short 3 twenty cent post rubbers. ... to me with an invoice....shitty vendor. ... I think a person can vent when he spends $160 and he purchases a kit ...
    (rec.games.pinball)
  • Re: Defective media -- How do I replace?
    ... Contact the vendor you bought it from - if it's that badly damaged..... ... "Steve" wrote in message ... > I just received the Frontpage 2003 upgrade ordered from J and R Electronics ...
    (microsoft.public.frontpage.client)
  • Re: I really need help!!
    ... Could be a faulty unit. ... Try it on another pc if you can, then take it back to the vendor. ... "Steve" wrote: ... is unaware of the erase protection. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Multi Table Query Help
    ... i wanna to display your tables first ... actully it will take time to make query but if you use ... MySQL you cannot use subquery cuz it not supportted (may be in the ... instead of using 2 fileds in vendor manufacturer_YN, ...
    (comp.lang.php)