let me give some background knowledge on my problem currently: courses programmes degrees are stored in the database, the app allows people to create courses and programmes. Then they are allowed to assign courses and programmes together, of course no duplicates allowed. The combinations are stored in the degree table. eg. Records in the degree table Record 1: course code: fg123 programme code: ha123 Record 2: course code: yh123 programme code: ha123 Record 3: course code: ji123 programme code: kp123 now the problem i have met with is that i want to allow the user to click on a link, which displays all the programme codes, i have grouped them together such that the user will see.. Programmes: -ha123 -kp123 and when they click on the link itself, the app will be able to display all the course codes of courses which has that programme code eg. when user clicks on ha123 Courses under ha123: -fg123 -yh123 can anyone guide me on how to do this without injecting sql statements? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---