[snip "Chris"]

If you want multiple customers to be associated with each issue you need 
3 tables:

create table customers (customerid int auto_increment primary key, 
customername varchar(255));

create table issues (issueid int auto_increment primary key, issuetitle 
varchar(255));

create table customer_issues (issueid int, customerid int);

then you can do:

select * from
customers c, issues i, customer_issues ci
where
c.customerid=ci.customerid AND
ci.issueid=i.issueid;

[/snip]


Is there not a better way to do that? What will happen there is that a large
result set will be created because when you just do "select * from
customers c, issues i, customer_issues ci" it will be like the inner product
from all these tables, and then just choosing the right ones.

If the table C have 1000 records, issues 5000 and customer_issues 15000 you
would end up with a 75,000,000,000 rows large results set, that would not be
so sweet, would it?

/Peter


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to