I've come across a stumbling point in my web app.

I used a left join in a previous app to get a list of items used to populate
a set of check box items and to see if they were checked.

eg
SELECT list_item.value, list_item.label, m2m.trans_id
FROM list_item
LEFT_JOIN m2m ON
(m2m.response_id = list_item.value AND m2m.trans_id = ?

List_item table has two columns (label, value) and m2m table has two columns
(response_id, trans_id)

This gives me a list which I use to iterate through and generate a set of
checkboxes (using label, value) and I can do a check if trans_id != null
then I add a checked property to the  checkbox. This all works fine.

I now have the need to store multiple list types in the list_item table and
have to add a list_type column to the list_item table.

My problem here is because of my limited SQL knowledge I can't see how I
still generate the sort of list I need. Is this possible or do I have to use
another method altogether?

Zoran


Reply via email to