MySQL Forums
Forum List  »  Newbie

Need help on a select statement using MYSQL ^.^
Posted by: Sam Lee
Date: August 19, 2005 09:03PM

Hi,

I want to create a select statement showing -->

John -- happy -- Alice -- Mad -- Sunday
John -- Mad -- Alice -- happy -- Monday

Here is my table structure:

main (table)
main_id int int primary key
person_id_1 int references person(person_id)
mood_id int references mood(mood_id)
person_id_2 int references person(person_id)
mood_id int references mood(mood_id)
day char(10)

person (table)
person_id int primary key
person_name char(15)

mood (table)
mood_id int primary key
mood_type char(15)

I think my table structure setup is bad....thanks if anyone can help!

Options: ReplyQuote


Subject
Written By
Posted
Need help on a select statement using MYSQL ^.^
August 19, 2005 09:03PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.