Re: regarding multiple joins

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Greetings Jonathan

On 22 November 2002 at 01:55:10 -0800 (which was 09:55 where I live)
Jonathan Narong graced us with these comments

> i have an table 'articles' which has multiple fields, such as author,
> editor, photographer, etc.. each of these fields contains an index number
> which relates to another table 'people' that lists everyone. basically i
> just want to select  everything with the names displaying, instead of id
> numbers.

not sure exactly what you want.

I have a table called country. It contains all ID's.The name of which is in
an item table, so it has to use the item table a number of time so that it
can display just names to the user and not ID's

========== One I made earlier =============================================
select
  a.ItemId CID
  ,b.name country
  ,c.name Currency
  ,d.name Region
  ,e.name VAT
  ,f.name Delivery
from
  country a
  ,item b
  ,item c
  ,item d
  ,item e
  ,item f
where
  a.itemid = b.itemid
  and a.CurrId = c.itemid
  and a.GeoRegId = d.itemid
  and a.VaTID = e.itemid
  and a.DelID = f.itemid
order by f.name
========== One I made earlier =============================================

HTH

- --
 Best regards,             _______________________________________________
  David                   |    David  Elliott    |   Software Engineer    |
 _________________________| david@elliott.uk.com | PGP Key ID 0x650F4534  |
| "It should be a while...he's very thorough." -- Trapper on Hawkeye      |

-----BEGIN PGP SIGNATURE-----
Version: 6.5.8ckt http://www.ipgpp.com/

iQA+AwUBPd4EYvmK8eZlD0U0EQLBuwCWJZVbOfWxqmMd+4KgqKmIgRs3agCggA2g
qzjRbhBT9szMn6EJI4lHZhE=
=e0St
-----END PGP SIGNATURE-----


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux