Re: SELECT of records that have a matching record in a many to many table

2009-05-04 Thread Martijn Engler
eone please help me with this one? > > I'm trying to SELECT from a table only those records that have a record, > matching a search term, in a table related by a many to many relationship. > The many to many relationship is in a mapping/junction table. > >

SELECT of records that have a matching record in a many to many table

2009-04-30 Thread Nigel Peck
Can someone please help me with this one? I'm trying to SELECT from a table only those records that have a record, matching a search term, in a table related by a many to many relationship. The many to many relationship is in a mapping/junction table. Here's an example of what I h

Re: Many to many to too many relation.

2008-09-30 Thread Rob Wultsch
Responses inline... On Tue, Sep 30, 2008 at 9:21 AM, Weston, Craig (OFT) <[EMAIL PROTECTED]> wrote: > > Rob, > I tried this on the small test data, a larger data set and it appears to > make my day. I sincerely appreciate your willingness to help me out. > > I do have some questions, mostly so I c

RE: Many to many to too many relation.

2008-09-30 Thread Weston, Craig (OFT)
k you. -Original Message- From: Rob Wultsch [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2008 10:11 AM To: Weston, Craig (OFT) Cc: mysql@lists.mysql.com Subject: Re: Many to many to too many relation. Luck for you my vpn appears to be screwed up. Here is a stored proc I whipp

RE: Many to many to too many relation.

2008-09-30 Thread Weston, Craig (OFT)
Wow, I do feel very lucky. I am only at the "this is a cursor" part. I sincerely appreciate your help. -Original Message- From: Rob Wultsch [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2008 10:11 AM To: Weston, Craig (OFT) Cc: mysql@lists.mysql.com Subject: R

Re: Many to many to too many relation.

2008-09-30 Thread Rob Wultsch
> From: Rob Wultsch [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 30, 2008 3:30 AM > To: Weston, Craig (OFT) > Cc: mysql@lists.mysql.com > Subject: Re: Many to many to too many relation. > > I tried reading this and it took much brain power to do for free. I >

Re: Many to many to too many relation.

2008-09-30 Thread Rob Wultsch
his e-mail or its > attachments. Please notify the sender immediately by reply e-mail and > delete the e-mail from your system. > > > -Original Message- > > From: Rob Wultsch [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 30, 2008 3:30 AM > To: Weston, Crai

Re: Many to many to too many relation.

2008-09-30 Thread Peter Brawley
from your system. -Original Message- From: Rob Wultsch [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2008 3:30 AM To: Weston, Craig (OFT) Cc: mysql@lists.mysql.com Subject: Re: Many to many to too many relation. I tried reading this and it took much brain power to do for free. I

RE: Many to many to too many relation.

2008-09-30 Thread Weston, Craig (OFT)
, Craig (OFT) Cc: mysql@lists.mysql.com Subject: Re: Many to many to too many relation. I tried reading this and it took much brain power to do for free. I suggest breaking this down into the simplest possible example you can. Ideally have an create table statement, and insert with a small amount of

Re: Many to many to too many relation.

2008-09-30 Thread Rob Wultsch
I tried reading this and it took much brain power to do for free. I suggest breaking this down into the simplest possible example you can. Ideally have an create table statement, and insert with a small amount of data (as simple as possible), a simple psuedo code query and example output of what yo

Many to many to too many relation.

2008-09-29 Thread Weston, Craig (OFT)
Hello everyone. I have a complex situation. I have a list of related records (see partial extract below) where I am trying to determine the unique lowest number for each relation. This number should always be an AB number, since all the MA numbers will always relate to an AB number. I need the

how: many-to-many with LEFT JOIN

2008-03-10 Thread dr_pompeii
,car parts)[/b] the last new requeriment was that a wonderful 1 CabeceraComprobanteVenta can sell/contain [b]many items[/b] ArticuloNoAuto (1-4) and 1 ArticuloNoAuto can be contained in 1 to 2 CabeceraComprobanteVenta (normal) or (canceled,newnormal) so we have a relation many-to-many already res

Re: Counting number of associated many-to-many items

2007-10-26 Thread mysql
Robert MannI wrote: Hello! I have three tables, mapping out a n:n relationship of authors and the books they worked on: table 1: authors (id, name) table 2: authorships (author_id, book_id) table 3: books (id, name, bestseller tinyint) Here's two different queries I want to run: 1. Select eac

Counting number of associated many-to-many items

2007-10-26 Thread Robert MannI
Hello! I have three tables, mapping out a n:n relationship of authors and the books they worked on: table 1: authors (id, name) table 2: authorships (author_id, book_id) table 3: books (id, name, bestseller tinyint) Here's two different queries I want to run: 1. Select each author, and how man

Re: Many-to-many query (chained)

2007-09-29 Thread Rapthor
gt; > - > > Rapthor wrote: >> Hi SQLers, >> >> I am searching for an SQL command to combine several many-to-many >> queries. >> At the end I only want to get results suitable for all restrictions. >> >> Better show you my tables: >> &

Re: Many-to-many query (chained)

2007-09-29 Thread Peter Brawley
p'; it's a reserved word. PB - Rapthor wrote: Hi SQLers, I am searching for an SQL command to combine several many-to-many queries. At the end I only want to get results suitable for all restrictions. Better show you my tables: USER id name 1 frank ROLE id name 1 admin 2 gene

Many-to-many query (chained)

2007-09-29 Thread Rapthor
Hi SQLers, I am searching for an SQL command to combine several many-to-many queries. At the end I only want to get results suitable for all restrictions. Better show you my tables: USER id name 1 frank ROLE id name 1 admin 2 general GROUP id name 1 groupA 2 groupB USER_ROLE

Re: select records not in a *particular* many-to-many relationship

2006-04-18 Thread Marco Carbone
gerald_clark wrote: I've checked the archives and found an explanation as to how the check if a record is not in a many-to-many table. The answer to that is somewhat simple and clear to me. But here's my problem: how do you check if a record doesn't have a *particula

Re: select records not in a *particular* many-to-many relationship

2006-04-18 Thread gerald_clark
I've checked the archives and found an explanation as to how the check if a record is not in a many-to-many table. The answer to that is somewhat simple and clear to me. But here's my problem: how do you check if a record doesn't have a *particular* many-to-many relat

Re: select records not in a *particular* many-to-many relationship

2006-04-18 Thread Peter Brawley
Marco, I've checked the archives and found an explanation as to how the check if a record is not in a many-to-many table. The answer to that is somewhat simple and clear to me. But here's my problem: how do you check if a record doesn't have a *particular* many-to-many relat

select records not in a *particular* many-to-many relationship

2006-04-18 Thread Marco Carbone
Hey all, I've checked the archives and found an explanation as to how the check if a record is not in a many-to-many table. The answer to that is somewhat simple and clear to me. But here's my problem: how do you check if a record doesn't have a *particular* many-to-many re

Re: Find records not in many-to-many table?

2006-03-27 Thread sheeri kritzer
run out of places to look, > sorry. I can't seem to find this anywhere, although I'm certain I've seen it > before. > > How can I identify all the records in a table that are not referenced in a > many-to-many table? > > I have a [unique] table of files and a

Re: Find records not in many-to-many table?

2006-03-26 Thread Stefan Kuhn
> > > > Am Saturday 25 March 2006 19:10 schrieb barney: > > > Folk, > > > > > > This may be off-base for this list, but I've run out of places to look, > > > sorry. I can't seem to find this anywhere, although I'm certain I've >

Re: Find records not in many-to-many table?

2006-03-25 Thread barney
ain I've seen it > before. > How can I identify all the records in a table that are not referenced in a > many-to-many table? > I have a [unique] table of files and a [unique] table of attributes.  These > are linked in a merge table which is many-to-many.  I need to

Re: Find records not in many-to-many table?

2006-03-25 Thread Michael Stassen
barney wrote: Thanks, Stefan, But that only works if both tables have the same field name, doesn't it? If I use select FileKey from dl_files left join dl_merges using (FileID) where FileID is null MySQL returns Unknown column 'articles.dl_files.FileID' in 'on clause'. Correct me if I'm wrong,

Re: Find records not in many-to-many table?

2006-03-25 Thread Peter Brawley
nd this anywhere, although I'm certain I've seen it before. How can I identify all the records in a table that are not referenced in a many-to-many table? I have a [unique] table of files and a [unique] table of attributes. These are linked in a merge table which is many-to-many. I need t

Re: Find records not in many-to-many table?

2006-03-25 Thread barney
t; > This may be off-base for this list, but I've run out of places to look, > > sorry. I can't seem to find this anywhere, although I'm certain I've seen > > it before. > > > > How can I identify all the records in a table that are not reference

Re: Find records not in many-to-many table?

2006-03-25 Thread Stefan Kuhn
to find this anywhere, although I'm certain I've seen > it before. > > How can I identify all the records in a table that are not referenced in a > many-to-many table? > > I have a [unique] table of files and a [unique] table of attributes. These > are linked in a m

Find records not in many-to-many table?

2006-03-25 Thread barney
Folk, This may be off-base for this list, but I've run out of places to look, sorry. I can't seem to find this anywhere, although I'm certain I've seen it before. How can I identify all the records in a table that are not referenced in a many-to-many table? I have a [un

Re: Multiple many-to-many SELECT

2006-02-13 Thread SGreen
oops! I hit SEND before I was done. (BAD FINGERS!) SELECT * FROM movies LEFT JOIN director_movies ON director_movies.movie_id=movies.id LEFT JOIN director ON director_movies.director_id = director.id LEFT JOIN country_movies ON country_movies.movie_id=movies.id LEFT JOIN country

Re: Multiple many-to-many SELECT

2006-02-13 Thread SGreen
t;> `producer_id` int(11) NOT NULL default '0' > >>> ) ENGINE=InnoDB DEFAULT CHARSET=latin1 > >>> > >>> Again, I'm trying to select from movies,director, and producer, >

Fw: Multiple many-to-many SELECT

2006-02-12 Thread Rhino
Oops, I meant to send this to the list so that all could benefit. -- Rhino - Original Message - From: "Rhino" <[EMAIL PROTECTED]> To: "Jessica Yazbek" <[EMAIL PROTECTED]> Sent: Sunday, February 12, 2006 4:19 PM Subject: Re: Multiple many-to-many SELECT

Re: Multiple many-to-many SELECT

2006-02-12 Thread Peter Brawley
Maybe I'm using the wrong keywords. In any event, I am desperate for help. Here is my problem: I have a database with several tables related on a many-to-many basis. Here is a simplified description: TABLE: movies +

Re: Multiple many-to-many SELECT

2006-02-12 Thread Jessica Yazbek
has been trying to do the same thing that I am. Maybe I'm using the wrong keywords. In any event, I am desperate for help. Here is my problem: I have a database with several tables related on a many-to-many basis. Here is a simplified description: TABLE: movies +-+

Re: Multiple many-to-many SELECT

2006-02-10 Thread Jessica Yazbek
tween each many-to-many relationship. The tables are as follows: movies director producer director_movies (relates director.id to movies.id) producer_movies (relates producer.id to movies.id) I'm hoping for a way to select movies.*, director.* and producer.* using only the movies.id fie

Re: Multiple many-to-many SELECT

2006-02-10 Thread sheeri kritzer
.html Note the link at the bottom of that page to "Data Modeling as part of Database Design". That whole site is really good, actually. -Sheeri On 2/9/06, Rhino <[EMAIL PROTECTED]> wrote: > Jessica, > > It think your first mistake is that you are trying to implemen

Re: Multiple many-to-many SELECT

2006-02-09 Thread Rhino
Jessica, It think your first mistake is that you are trying to implement many-to-many relationships directly. Although it is theoretically possible to do so, I've never seen anyone do it myself. I believe the normal approach is to break each many-to-many relationship into two one-to

Multiple many-to-many SELECT

2006-02-09 Thread Jessica Yazbek
I have a database with several tables related on a many-to-many basis. Here is a simplified description: TABLE: movies +-+-+--+-+-+---+ | Field | Type| Null | Key | Defau

Re: many to many

2005-04-21 Thread Rhino
because they both try to conform to the same standards. Rhino - Original Message - From: "Perry Merritt" <[EMAIL PROTECTED]> To: Sent: Wednesday, April 20, 2005 11:36 PM Subject: many to many > Hi, I'm a novice. > > I've designed a database that supports ma

Re: many to many

2005-04-20 Thread Simon Garner
On 21/04/2005 3:36 p.m., Perry Merritt wrote: Hi, I'm a novice. Hi Perry, I've designed a database that supports many to many relationships (actually many to many to many) and I need help creating the query to find my data. I know things like JOINs exist, but don't have a clue

Re: many to many

2005-04-20 Thread Kim Briggs
t; > I've designed a database that supports many to many relationships (actually > many to many to many) and I need help creating the query to find my data. I > know things like JOINs exist, but don't have a clue how to use them. > > I have three main tables and two link

many to many

2005-04-20 Thread Perry Merritt
Hi, I'm a novice. I've designed a database that supports many to many relationships (actually many to many to many) and I need help creating the query to find my data. I know things like JOINs exist, but don't have a clue how to use them. I have three main tables and two l

Re: many-to-many query

2004-10-29 Thread Rhino
- Original Message - From: "Emily Lena Jones" <[EMAIL PROTECTED]> To: "Rhino" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, October 28, 2004 7:46 PM Subject: Re: many-to-many query > > Quoting Rhino <[EMAIL PROTECTED]>: >

Re: many-to-many query

2004-10-28 Thread Emily Lena Jones
Quoting Rhino <[EMAIL PROTECTED]>: > I wasn't sure if you understood the concept of association tables so forgive > me if I told you things you already knew; I didn't mean to be patronizing. No problem--you weren't patronizing at all, and I did tell you I was new at this! > With respect to you

Re: many-to-many query

2004-10-28 Thread Rhino
- Original Message - From: "Emily Lena Jones" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 28, 2004 4:05 PM Subject: many-to-many query > Hi, I'm totally new at this so have no idea whether I'm asking for something > easy o

many-to-many query

2004-10-28 Thread none none
http://dev.mysql.com/doc/mysql/en/JOIN.html -Original Message- From: Emily Lena Jones [mailto:[EMAIL PROTECTED] Sent: Thursday, October 28, 2004 1:05 PM To: [EMAIL PROTECTED] Subject: many-to-many query Hi, I'm totally new at this so have no idea whether I'm asking for somethi

many-to-many query

2004-10-28 Thread Emily Lena Jones
Hi, I'm totally new at this so have no idea whether I'm asking for something easy or quite difficult. I am working in MySQL 3.23.58/PHP and am trying to construct a rather complex query. I have three tables: resources (containing resid, descr, title, url), topicdir (containing topicid, resid) and

Re: Querying on subsets of one-to-many and many-to-many

2004-10-27 Thread Daniel BODEA
> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, October 26, 2004 6:41 PM Subject: Re: Querying on subsets of one-to-many and many-to-many > OK, now that I have a better model to work with, let me try again. (And > stop being so discouraged! This is hard for everyone until they get the >

Re: Querying on subsets of one-to-many and many-to-many

2004-10-26 Thread SGreen
isputable of course) impossibility > of this thing using one trip only. > > Daniel > > - Original Message - > From: <[EMAIL PROTECTED]> > To: "Daniel BODEA" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Tuesday, October 26, 200

Re: Querying on subsets of one-to-many and many-to-many

2004-10-26 Thread Daniel BODEA
to myself the (disputable of course) impossibility of this thing using one trip only. Daniel - Original Message - From: <[EMAIL PROTECTED]> To: "Daniel BODEA" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, October 26, 2004 3:41 PM Subject: Re: Query

Re: Querying on subsets of one-to-many and many-to-many

2004-10-26 Thread SGreen
Under most circumstances, even with data tables as large as yours, I have found that direct JOIN statements have provided acceptable performance. On certain highly normalized databases, where the requirements of the query needed more than 4 or 5 tables joined at once, I have also used your "cac

Querying on subsets of one-to-many and many-to-many

2004-10-26 Thread Daniel BODEA
Greetings, I have several solutions to a problem which requires temporary or cache tables but the different solutions are time consuming to test for performance and I was wondering if anyone had more information on this than myself. The server is 3.23.40 without possibility for upgrade to 4.x bec

how to optimize multiple many-to-many relationship related query

2004-10-18 Thread Elim Qiu
I have, to make it clear, 2 many-to-many relationships for table person: PersonPerson_Club ClubPerson_Creditcard CreditCard

Re: Many to Many: Does this make sense ?

2004-08-28 Thread Rhino
IL PROTECTED]> Sent: Saturday, August 28, 2004 6:08 PM Subject: Re: Many to Many: Does this make sense ? > Okay, hopefully I'm somewhat clearer today. I doubt > it but the effort is going to be made regardless. > > First off, Rhino I read through your last post, > regardin

Re: Many to Many: Does this make sense ?

2004-08-28 Thread Stuart Felenstein
f you have definitely abandoned > it. Maybe we can critique > that design for you and help you improve it or at > least avoid the most > common pitfalls. > > Rhino > > > > > - Original Message - > From: "Stuart Felenstein" <[EMAIL PROTECTED]>

Re: Many to Many: Does this make sense ?

2004-08-27 Thread Shawn
As for the RAD tool I'm open to suggestions, but I think I've read about them all. PHP - MySQL platform. Does it have to be PHP? If a java RAD is ok I would suggest http://jdbforms.sourceforge.net/ It does not allow multiple inserts from one page, BUT you can: 1) tack in some html (text area o

Re: Many to Many: Does this make sense ?

2004-08-27 Thread Rhino
From: "Stuart Felenstein" <[EMAIL PROTECTED]> To: "Rhino" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; "Stuart Felenstein" <[EMAIL PROTECTED]> Sent: Friday, August 27, 2004 4:47 PM Subject: Re: Many to Many: Does this make se

Re: Many to Many: Does this make sense ?

2004-08-27 Thread Stuart Felenstein
uart Felenstein" <[EMAIL PROTECTED]> > To: "Rhino" <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]>; "Stuart Felenstein" > <[EMAIL PROTECTED]> > Sent: Friday, August 27, 2004 3:05 PM > Subject: Re: Many to

Re: Many to Many: Does this make sense ?

2004-08-27 Thread Rhino
My replies are interspersed below. Rhino - Original Message - From: "Stuart Felenstein" <[EMAIL PROTECTED]> To: "Rhino" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; "Stuart Felenstein" <[EMAIL PROTECTED]>

Re: Many to Many: Does this make sense ?

2004-08-27 Thread Stuart Felenstein
take. Plus the lack it would still leave. I'm going to go over my schema though and see where the many to many relationships will work well for me. I'm assuming telephone numbers (SL Green's example) that are specific to the user / member need not necessarily be broken out ? P

Re: Many to Many: Does this make sense ?

2004-08-27 Thread Rhino
Shawn, Yes, we *are* on the same page, now that I understand that you didn't mean to implement the many-to-many relationship in a single table. Stuart, Read what Stuart has described in this note. The association table is the one he calls TItle_Member. This table is *crucial* to the d

Re: Many to Many: Does this make sense ?

2004-08-27 Thread SGreen
Rhino, You and I are on the same page. I also never seen a "true many-to-many" relationship in database design. The closest approximation I have seen is the 3 table design like you and I have both proposed. It's the only way I have ever seen to model a many-to-many design, that

Re: Many to Many: Does this make sense ?

2004-08-27 Thread Stuart Felenstein
rim" table that must exist in the many to many / one to many design makes no sense to me. I guess it serves as some type of support structure ? I agree that it would be better to have a list prepared for users to choose from. I'm working on a job board. Looking out on the vast sea of c

Re: Many to Many: Does this make sense ?

2004-08-27 Thread Rhino
My remarks are interspersed below for reasons which will probably be obvious. Rhino - Original Message - From: [EMAIL PROTECTED] To: Stuart Felenstein Cc: [EMAIL PROTECTED] ; Peter Brawley ; Rhino Sent: Friday, August 27, 2004 12:33 PM Subject: Re: Many to Many: Does this

Re: Many to Many: Does this make sense ?

2004-08-27 Thread Rhino
is the way it is. Rhino - Original Message - From: "Stuart Felenstein" <[EMAIL PROTECTED]> To: "Rhino" <[EMAIL PROTECTED]>; "Peter Brawley" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, August 27, 2004 11:47 AM Subject: Re: Many t

Re: Many to Many: Does this make sense ?

2004-08-27 Thread SGreen
7;s a business rule and you code for that above the database (either in your validation code or, in this case, through UI design) I would stick with the many-to-many database design as you don't want people mis-typing titles all of the time:"Godfather" is not "The Godfathe

Re: Many to Many: Does this make sense ?

2004-08-27 Thread Stuart Felenstein
ROTECTED]> wrote: > > - Original Message - > From: "Stuart Felenstein" <[EMAIL PROTECTED]> > To: "Peter Brawley" > <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > Sent: Friday, August 27, 2004 10:06 AM > Subject: Re: Many to Ma

Re: Many to Many: Does this make sense ?

2004-08-27 Thread Rhino
- Original Message - From: "Stuart Felenstein" <[EMAIL PROTECTED]> To: "Peter Brawley" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, August 27, 2004 10:06 AM Subject: Re: Many to Many: Does this make sense ? > Thank you for the "

Re: Many to Many: Does this make sense ?

2004-08-27 Thread Stuart Felenstein
quot;. To > >allow 5 titles I need 5 pages. From a users > >standpoint, it's not horrible, but not the best. > > >So, now I'm podering a Many to Many, but I realize > >there would need to be multiple Member_Title > tables, > >Member_Title1, Member_Title

Re: Many to Many: Does this make sense ?

2004-08-27 Thread Peter Brawley
same table on one "page". To >allow 5 titles I need 5 pages. From a users >standpoint, it's not horrible, but not the best. >So, now I'm podering a Many to Many, but I realize >there would need to be multiple Member_Title tables, >Member_Title1, Member_Title2, M

Many to Many: Does this make sense ?

2004-08-27 Thread Stuart Felenstein
to capabilities to allow multiple insert transactions into the same table on one "page". To allow 5 titles I need 5 pages. From a users standpoint, it's not horrible, but not the best. So, now I'm podering a Many to Many, but I realize there would need to be multiple Membe

Re: How do I select 'all related' in a many-to-many relation?

2003-02-25 Thread Mac
Harald Fuchs wrote: > That's easy: [Excellent MySQL code example snipped] Thanks, that was exactly what I was looking for. /mac - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://li

Re: How do I select 'all related' in a many-to-many relation?

2003-02-20 Thread Mac
Thanks for your reply, Diana Soares wrote: > > Selecting manufacturers from just one color with join works like a charm. > > (IIRC, untested code:) > > > > SELECT DISTINCT ca.Manufacturer, co.Name FROM car_color_links as l > > JOIN colors as co ON (co.ID = l.color_ID)

Re: How do I select 'all related' in a many-to-many relation?

2003-02-20 Thread Diana Soares
Hi, On Thu, 2003-02-20 at 13:20, Mac wrote: > Hi, > > I am using MySQL v3.23 and have a many-to-many relationship (cars <-> > colors) that I have broken up into three tables as follows > > cars: > ID Manufacturer > 1 Volvo > 2 BMW

Re: updating many-to-many relationships?

2003-02-20 Thread gerald_clark
I don't have a mailing list, and I don't appreciate your email. You subscribed to the mysql mailing list, or you would not be getting it. The instructions to unsubscribe are at the bottom of every message. Kip McGee wrote: will you please take me off of your mailing list if you dont im gonna se

How do I select 'all related' in a many-to-many relation?

2003-02-20 Thread Mac
Hi, I am using MySQL v3.23 and have a many-to-many relationship (cars <-> colors) that I have broken up into three tables as follows cars: ID Manufacturer 1 Volvo 2 BMW 3 Toyota

Re: updating many-to-many relationships?

2003-02-19 Thread Paul Chvostek
On Wed, Feb 19, 2003 at 08:13:12AM -0600, gerald_clark wrote: > > Looks to my like skuagent should be using the varchar fields instead of > the int fields. > Then you could just insert ignore each line from your test file. > > Paul Chvostek wrote: > > >Hi all. > &

Re: updating many-to-many relationships?

2003-02-19 Thread gerald_clark
Looks to my like skuagent should be using the varchar fields instead of the int fields. Then you could just insert ignore each line from your test file. Paul Chvostek wrote: Hi all. I need some help figuring out how to update a many-to-many relationship from a text file. For the fun of it

updating many-to-many relationships?

2003-02-19 Thread Paul Chvostek
Hi all. I need some help figuring out how to update a many-to-many relationship from a text file. For the fun of it, let's call the tables 'sku' and 'agent'. Each sku can have multiple agents (usually < 10, always > 0), and each agent can be associated with an u

Re: [MANY to MANY] relationship with MySQL ???

2002-04-17 Thread =d0Mi=
but i'm 97% that it works... ofcource You have to modify the query to match Your DB layout =d0Mi= - Original Message - From: "Matthew Smith" <[EMAIL PROTECTED]> To: "mysql" <[EMAIL PROTECTED]> Sent: Thursday, April 18, 2002 8:04 AM Subject: Re: [MANY

Re: [MANY to MANY] relationship with MySQL ???

2002-04-17 Thread Matthew Smith
MySQL AFAIK. > > I am not quite sure what you mean... but here is my take anyways. Is this > going around my elbow? Or is this just how you do relationals in SQL? > This is a standard way of doing many-to-many relationships in SQL; there may be others. > (For each relationship

Re: [MANY to MANY] relationship with MySQL ???

2002-04-17 Thread Robbie Newton
> ...So the table song_x_artist contains references to all artists in a > song and vice-versa. (Field names correspond between tables.) How does song_x_artist reference the other databases? Is there a way to set up a field to always be a reference to another table? I am not quite sure what you

Re: [MANY to MANY] relationship with MySQL ???

2002-04-17 Thread Arthur Fuller
on or helped compose. hth, Arthur - Original Message - From: "Robbie Newton" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 17, 2002 10:25 PM Subject: [MANY to MANY] relationship with MySQL ??? > Hello all, > > [~~I guess I could do so

Re: [MANY to MANY] relationship with MySQL ???

2002-04-17 Thread Matthew Smith
Hi Robbie, all I have lots of things that need many to many - the way that I do it is this: create table artists ( a_ser int unsigned not null primary key auto_increment, artist_name varchar(64), other stuff... ); create table songs ( s_ser int unsigned not null primary key auto_increment

[MANY to MANY] relationship with MySQL ???

2002-04-17 Thread Robbie Newton
rtists featured in that song in the window that loads up. I am not sure how to set this up. It would be a many to many relationship I think... (one given artist could be featured on many different songs) [many] to (one given song could have many featured artists) [many] My first thout of how to

querying for non-matching records in many-to-many relationship

2002-02-01 Thread Myk Melez
I can't figure out how to formulate a query to retrieve a certain set of data. I have two tables in a many-to-many relationship with each other via a linking table. I want to get a list of the records in the first table which have no matching records of a certain value in the second

Re: is it a many-to-many?

2001-11-14 Thread Aleksandar Bradaric
an example) the > joins ID_weight_measure with the related symbol, and > the ID_height_measure with its symbol? > I don't know if it's a many-to-many relationship, and > even if it is, I don't know how to implement it. > I hope in your help. select p.id_weight_measure,

is it a many-to-many?

2001-11-14 Thread Carlo Loiudice
elect statement both (or any...this is only an example) the joins ID_weight_measure with the related symbol, and the ID_height_measure with its symbol? I don't know if it's a many-to-many relationship, and even if it is, I don't know how to implement it. I

RE: Can one SELECT records depending on multiple entries in a many to many table?

2001-10-02 Thread Joe Kaiping
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Benjamin > Hi. > > On Mon, Oct 01, 2001 at 07:54:37PM -0700, [EMAIL PROTECTED] wrote: > > > > Hi there, > > > > I have a many-to-many relationship: > >

Re: Can one SELECT records depending on multiple entries in a many to many table?

2001-10-01 Thread Benjamin Pflugmann
Hi. On Mon, Oct 01, 2001 at 07:54:37PM -0700, [EMAIL PROTECTED] wrote: > > Hi there, > > I have a many-to-many relationship: > > ind table > - > id = 4, name = Joe > id = 5, name = Jane > > bus_ctr table > - > id = 1, name = downt

Can one SELECT records depending on multiple entries in a many to many table?

2001-10-01 Thread Joe Kaiping
Hi there, I have a many-to-many relationship: ind table - id = 4, name = Joe id = 5, name = Jane bus_ctr table - id = 1, name = downtown mall id = 2, name = sunshine mall id = 3, name = express shop mm_ind_bus_ctr table (many to many association table

Re: many to many join on 2 tables.

2001-07-16 Thread Cal Evans
t11, table 2 as t2 where t1.blah = t11.blah and t1.blah = t2.blah; Or something to that effect. Cal * * Cal Evans * Senior Internet Dreamer * http://www.calevans.com * - Original Message - From: "Nick Davies" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday,

many to many join on 2 tables.

2001-07-16 Thread Nick Davies
Hi, I'm have a bit of difficulty with a many to many join on two tables. (Where an item is directly related to another item of the same type in the same table). I'm trying to use the same method as a join between 2 tables with a 3rd but having no joy. Help :)

Help: Many to Many Select

2001-07-13 Thread Simon
Hello, I need help with a select statement on my database. (I am still on L Plates with Mysql) My Tables Clients - Holds clients infomation Targets - Holds Target infomation Clients_Targets - Holds Clients Id and Targets Id How do I find clients that are in muti

Re: Help - Selecting from many to many table.

2001-07-08 Thread Rolf Hopkins
"Mysql" <[EMAIL PROTECTED]> Sent: Sunday, July 08, 2001 2:08 Subject: Help - Selecting from many to many table. > Hello, > > I am new to SQL and just learning. > > I have a table of clients and a table of targets. I have a clients_targets > table holding the ke

Help - Selecting from many to many table.

2001-07-07 Thread Simon
Hello, I am new to SQL and just learning. I have a table of clients and a table of targets. I have a clients_targets table holding the keys for relating. I am having troble trying to select clients that are in more than one target. Eg. Select c.First_Name, ... From clients as c, clients_targ

Many to Many

2001-04-19 Thread Agustin Eloy Barrios Arteaga
Hello again here send al SQL to generate the database to test in MYSQL, for example in case that I Question in the query that a Productor TECUN (1) no cant be return, pepe(2), lolo(1) CEIS (2) no cant be return lolo(1) PCMAX (3) no cant be return pepe(2) A Numbres are the ID In the table cp th

RE: AND on a many to many table, with arbitrary ANDs

2001-01-31 Thread Javier Muniz
inal Message- From: Rus [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 2:11 AM To: [EMAIL PROTECTED] Subject: Re: AND on a many to many table, with arbitrary ANDs I think you could use 'WHERE catid IN' For example, on PHP $catlist="1,2,3,4,5"; ... select ... wher

Re: AND on a many to many table, with arbitrary ANDs

2001-01-31 Thread Rus
> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 31, 2001 7:50 AM Subject: AND on a many to many table, with arbitrary ANDs > Hello everyone, > > I am in the process of building a search engine on a database. I have two > tables that have a many-to-many relationship: A s

Re: AND on a many to many table, with arbitrary ANDs

2001-01-30 Thread hooker
ar more simultaneous enquiries that way than it will with a single complex SQL query. Hope this helps some. The Hooker -- "I've had a perfectly wonderful evening, but this wasn't it" > I am in the process of building a search engine on a database. I have two > tables that h

  1   2   >