These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Help for a request :-)
PostPosted: Fri Oct 30, 2009 5:49 am 
Newbie

Joined: Mon Oct 26, 2009 6:58 am
Posts: 1
Hello,

Sorry for my english, I'm french. I want to know the best way to do the following request.

The database contains the following table :

Table Level (ID, LABEL) ; ex : [{1, 'beginner'}, {2, 'pro'}]
Table Categorie (ID, LABEL, ID_LEVEL) ; ex : [{1, 'Science', 1}, {2, 'Business', 1}, {3, 'Economy', 2}]
Table Lessons (ID, LABEL, ID_CATEGORIE) ; ex : [{1, 'Mathematics', 1},{2, 'Biology', 1}]

I want to get the following results :

Each Categorie and the Lessons associated for the level 1 (beginner).

-- {1, 'Science', 1}
----- {1, 'Mathematics', 1}
----- {2, 'Biology', 1}
-- {2, 'Business', 1}

Can you please help me to do the minimum of request as possible ?

Those tables are only examples.

Thanks in advance,

Sincerely,


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.