
August 12th, 2002, 03:33 AM
|
|
|
|
Join Date: Apr 2007
Location: Stockholm, Sweden
Posts: 98
Time spent in forums: < 1 sec
Reputation Power: 3
|
|
|
"Inverted join"?
Hi,
I have to tables, one called users ande the other called winners.
php Code:
Original
- php Code |
|
|
|
create table users ( user_id int unsigned NOT NULL auto_increment, answer_id int unsigned NOT NULL REFERENCES answers, name varchar(100) NOT NULL, email varchar(255) NOT NULL, street varchar(100) NOT NULL, zipcode varchar(6) NOT NULL, city varchar(50) NOT NULL, phone varchar(20) NOT NULL, winner bit NOT NULL, create_date datetime NOT NULL, modify_date timestamp(14) NOT NULL, ); create table winners ( winner_id int unsigned NOT NULL auto_increment, competion_id int REFERENCES competions, user_id int NOT NULL REFERENCES users, create_date datetime NOT NULL, modify_date timestamp(14) NOT NULL, );
When I draw a winner from the user table I create a post in the winner table. I now want to present a list of all users except does allready in the winner table.
Is it possible to do an inverted join or something?
|