in reply to Joining Tables Problem
Oh my that's a lot of code. If I understand your question correctly then you've really out-done yourself. All the popular databases I'm aware of have JOIN statements (that link is the mysql version, but I'm certain the same principles apply for most databases)
The moral: when trying to manipulate database stuff, check your databases docs first! It will save you lots of time (yes I've learned that the hard-way)
As an extra here's a start on what you are trying to do. This *should* (untested) get all of your ID's and their coorisponding colors, one entry per color, so you'll have multple IDs that are the same (hint you can use that to put together lists to build your pop-up with). Anyway here's the query:
SELECT item_id, color FROM catalog_pet LEFT JOIN colors USING (item_id);
Hope that helps
Chris
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Joining Tables Problem
by b310 (Scribe) on Feb 17, 2003 at 20:10 UTC | |
by chromatic (Archbishop) on Feb 17, 2003 at 20:43 UTC | |
by LAI (Hermit) on Feb 17, 2003 at 20:49 UTC | |
by b310 (Scribe) on Feb 21, 2003 at 21:26 UTC | |
by LAI (Hermit) on Feb 21, 2003 at 22:55 UTC | |
by b310 (Scribe) on Feb 22, 2003 at 12:04 UTC | |
by b310 (Scribe) on Feb 22, 2003 at 19:04 UTC | |
by b310 (Scribe) on Feb 21, 2003 at 19:03 UTC | |
by LAI (Hermit) on Feb 21, 2003 at 22:52 UTC | |
by Tomte (Priest) on Feb 17, 2003 at 20:32 UTC |