hello, this is my first post here. I'm working on my movie library project now in vb2008. I have a form with 3 listboxes, a remove button and find button. Listbox1 is populated with names of actors from a table in the mysql database and selection mode = one. User can select items from listbox1 one by one and each selected item will be listed in listbox2. If user want to remove a selected item from the listbox2, remove button will do the work. I already made this part. My problem is I don't have an idea how to check those selected items in the database and show them on the listbox3. Here's how my table in the database looks:
id | name | title
1 | actor1 | movie1
2 | actor2 | movie1
3 | actor3 | movie1
4 | actor4 | movie1
5 | actor1 | movie2
6 | actor3 | movie2
7 | actor1 | movie3
8 | actor1 | movie4
9 | actor4 | movie5
10 | actor5 | movie5
So, say user chose actor1, actor3, and actor5, these three will be listed in the listbox2. If find button is clicked, listbox3 should show movie1, movie2, movie3, movie4, and movie5. If user remove actor1 from listbox2 and clicked the find button, listbox3 will show movie1, movie2, movie5. I tried to search the internet to find any idea about this but failed. I'm very thankful for this forum because this helped me accomplish the other parts of my current project so I decided to ask for help here. I'm just a newbie in vb2008 as you can say. Please help me solve this, any idea will be greatly appreciated. Thanks in advance, God bless.
vb_newbie
0
Newbie Poster
Recommended Answers
Jump to PostI guess you will need to construct a MySql Command like:
SELECT title FROM table WHERE name = 'actor1' OR name = 'actor2' OR name = 'actor3';
To create this sentence dinamically, you'll need verify if exist any item in the listbox2 and, if they exist, cicle over the items …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.