laptop545
January 27th, 2009, 02:47 PM
Hi Guys...CAn any1 help me on how to search a table...
I have the fields... "ID (unique and primary key)" , " Movie name" , "Genre", "Rating".....
Genre can be Comedy,Drama or Musical
Rating CAN be R, G,PG
Now i have an option in my app to search for movies with genre...that is i have 3 buttons.... Comedy, Drama ,Musical ..If i click any of the button i should get the related MOvies names.....
Same for Rating also...
My problem is if i have all of them in one table...if i have to search(say comedy movies...as they are not in order) i have to search for the entire table to get the answers......Can any1 tell me how to search witout searching the entire table.......
I have the fields... "ID (unique and primary key)" , " Movie name" , "Genre", "Rating".....
Genre can be Comedy,Drama or Musical
Rating CAN be R, G,PG
Now i have an option in my app to search for movies with genre...that is i have 3 buttons.... Comedy, Drama ,Musical ..If i click any of the button i should get the related MOvies names.....
Same for Rating also...
My problem is if i have all of them in one table...if i have to search(say comedy movies...as they are not in order) i have to search for the entire table to get the answers......Can any1 tell me how to search witout searching the entire table.......