Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.postgresql > #573

Help with 2 table arrays

Newsgroups comp.databases.postgresql
Date 2014-05-21 06:04 -0700
Message-ID <9c29ec52-a5cc-416a-a25a-699a4de140e9@googlegroups.com> (permalink)
Subject Help with 2 table arrays
From Tod <socialmediamanagerllc@gmail.com>

Show all headers | View raw


Hi, 
I just started learning postgres, and I believe this should be very straight forward and simple, but I can't get this to work. 

I have two tables, with one containing items in an array. I want to display the items in the array which correspond to the other table. 

The menu table contains the dishes that belong to a certain menu. Eg. Starters

I want to show the details for all the starters by showing the dish name and description. 

So for the menu id 16, I want to show the names of the dishes 20, 25, 26, etc ... in the output.

Menu Table 
ID       Dishes
16       ["20","25","26","36"]
17       .....


Dishes Table
ID       Name
19       Chicken
20       Beef
21       Fish
22       Prawn
.
.
.
32       Crackers


Appreciate any help on this. 

Thanks

Back to comp.databases.postgresql | Previous | NextNext in thread | Find similar


Thread

Help with 2 table arrays Tod <socialmediamanagerllc@gmail.com> - 2014-05-21 06:04 -0700
  Re: Help with 2 table arrays Dimitri Fontaine <dimitri@2ndQuadrant.fr> - 2014-05-21 15:58 +0200

csiph-web