:
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 have so far
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 have so far
distinct value in the relation, no matter
how many other members of the relation exist.
Can anyone offer any suggestions?
Here is some sample data to chew on.
AB100674,MA003296
AB100675,MA003306
AB100676,MA003314
AB100677,MA003312
AB100678,MA003321
AB100679,MA003318
, 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
.
-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
suggest breaking
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
, 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
suggest breaking this down into the simplest possible example you can.
Ideally have an create
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: Re: Many
.
-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
whipped up
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 can
and non-exclusive, by which I
mean that the data will always be in both columns, and it is possible
that more than one relation exists. In the case of more than 1 relation
I still need the just lowest distinct value in the relation, no matter
how many other members of the relation exist
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 resolved by hibernate with a link
many books he has worked on.
2. Select each author, and how many bestseller books (bestseller = 1)
he has worked on.
Not exactly sure how to do this, can someone help me out with this?
Thank you,
Rob
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe
each author, and how many books he has worked on.
SELECT a.id, a.name, COUNT(b.id) AS oeuvre FROM authors AS a
LEFT JOIN authorships AS asp ON asp.author_id = a.id
LEFT JOIN books AS b ON asp.book_id = b.id
GROUP BY a.id;
This will also take into account books whose authorship is shared.
2
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
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 general
GROUP
id name
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
user_id role_id
1 1
1 2
USER_GROUP
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
relationship
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
relationship
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
relationship
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 *particular* many-to-many
. 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 [unique] table of attributes. These
are linked in a merge table which
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 merge table which is many
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 [unique] table of files
, 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 to find all
items
. 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 [unique] table of attributes. These
are linked in a merge table which
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 find all
items in the file table
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,
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 find all items
in the file table that are not referenced in the merge table in order to add
appropriate attributes
with several tables related on a many-to-many
basis. Here is a simplified description:
TABLE: movies
+-+-+--+-+-+---+
| Field | Type| Null | Key | Default | Extra
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
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
+-+-+--+-+-+---+
| Field | Type
a database with several tables related on a many-to-many
basis. Here is a simplified description:
TABLE: movies
+-+-+--+-+-+---+
| Field | Type| Null | Key | Default | Extra
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
Assuming you are only worried about
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 implement many-to-many
relationships directly
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 field. 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 | Default | Extra
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-many
by all of the relational databases -
and many non-relational databases as well - and it will pay you big
dividends to know the language as you continue your work with MySQL.
There are lots of ways to learn SQL:
- online tutorials (just Google on 'SQL tutorial' and you should find a
bunch)
- books
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 link tables
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 tables, The main tables are A, B, and
C. Each are defined with id INT
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 how to use them
- 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]:
I wasn't sure if you understood the concept of association tables
with topic 36. Because I'm working in
an earlier version of MySQL, I can't use a subquery.
Any ideas/solutions/help would be most appreciated!
Many thanks,
Emily
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
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 something
easy
- 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 or quite difficult.
I am working in MySQL
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 your
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
hang of it!!! =8-D )
Given a query that resembles this select * from A where (no links
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
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
Many thanks for the quick answer. I apologize for leaving out a few details
that should have explained the context in greater detail. I'll use less
theory below to further explain what's going on and then I'll make some
remarks on your answer.
Simplified down to the basics of this problem, we
and rejects=0);
This returns three more columns that you originally wanted but it's still
a one-trip query.
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
Daniel BODEA [EMAIL PROTECTED] wrote on 10/26/2004 11:55:34 AM:
Many thanks for the quick answer. I apologize for leaving
I have, to make it clear, 2 many-to-many relationships for table person:
PersonPerson_Club ClubPerson_Creditcard
CreditCard
or whatever) to the generated pages allowing the user
to enter as many titles as they are allowed to
2) get what the user has entered out of the response and write a wee bit of code to do
the insertion (in what dbforms calls an interceptor).
For example, in your case, I would create these tables
Message -
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 sense ?
Let me answer the first part now
My replies are interspersed with Stuart's note.
Rhino
- Original Message -
From: Stuart Felenstein [EMAIL PROTECTED]
To: Rhino [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; Stuart Felenstein [EMAIL PROTECTED]
Sent: Saturday, August 28, 2004 6:08 PM
Subject: Re: Many
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 Member_Title tables,
Member_Title1, Member_Title2, Member_Title3, etc
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, Member_Title3, etc.
Sounds like a dreadul idea, breaks several relational rules
podering a Many to Many, but I realize
there would need to be multiple Member_Title
tables,
Member_Title1, Member_Title2, Member_Title3, etc.
Sounds like a dreadul idea, breaks several
relational rules and will make
more problems down the road c. Why not lose the RAD
tool, find a better
one
- 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 stop sign.
As for the RAD tool I'm open to suggestions
-
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 stop sign.
As for the RAD tool I'm open to suggestions, but I
think I've
submits
the multiple field input form, your handling code will need to go down the
list of fields and make the appropriate database entries. 1 form with 5
fields. User is happy, database is happy. You have kept the user from
entering too many choices because you only gave them as many fields as you
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 to Many: Does this make sense ?
I think this design is a better approach but only if
it's based on human
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
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 careers and
positions it's pretty
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's why I called
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 design
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 ? Perhaps they should be.
Stuart
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]
Sent: Friday, August 27, 2004 3:05 PM
Subject: Re: Many to Many: Does
[EMAIL PROTECTED];
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; Stuart Felenstein
[EMAIL PROTECTED]
Sent: Friday, August 27, 2004 3:05 PM
Subject: Re: Many to Many: Does this make sense ?
Now I am totally clear on it! Took a few
reiterations
but I'm there. Even more I'm going to abandon
]
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 sense ?
Let me answer the first part now and then continue
reading.
You absolutely gave me some great ideas
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)
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
colors:
ID
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
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
3 Toyota
Blue
Hmm, does this only return one row for each Manufacturer? I'll have to check it out.
Well at least I know I can't use the same trick here as I did in my
first query, since I don't know how many colors I could get returned.
/mac
--
Protect
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 unlimited number of records skus
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
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.
I need some help figuring out how to update a many-to-many relationship
from a text file
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 to MANY] relationship with MySQL ???
Hi Robbie
Reading what I wrote wasn't very clear to me either
:
Go to the samples page and choose an album to sample.
Returns the list of song names that result from the album you chose
click on one of the song names to open a new window with the shockwave file
that streams the song.
The client has asked me to add the (one or many) artists featured in that
song
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
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 something like MySQLselect FROM Songs where
artists
...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
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 you may want to have in a system
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
table
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 hope in your help.
Ciao carlo
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, m1.symbol,
p.id_height_measure, m2.symbol
from product p
-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:
ind table
-
id = 4, name = Joe
id = 5, name
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
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 = downtown mall
id = 2, name = sunshine mall
id = 3, name
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 :)
eg
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, July 16, 2001 08:02
Subject: many to many
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
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 keys for relating.
I am having troble trying to select clients that are in more than one
target.
Eg
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,
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
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 story table and a category
table.
S
:[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 ... where ... catid in ($catlist)
And of course you
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 story table and a category
table.
Story Table:
---
id | story|
---
1 | Alice in Wonderland
2 | Peter Pan
3 | Pokemon's adventure
4 | Tale
1 - 100 of 102 matches
Mail list logo