Hi, I wanna solution for retrieving records based on the following criteria:
I have some Restaurants with the cuisines as follows:
Restaurant 1 - Chinese, Japanese
Restaurant 2 - Chinese
Restaurant 3 - North Indian, Mexican, Chinese
Restaurant 4 - Hyderabadi, Chinese
When I perform a filtered Search i.e. if Chinese check box is clicked, I want the records to be displayed in the following order
Restaurant 2 - Chinese
Restaurant 1 - Chinese, Japanese
Restaurant 4 - Hyderabadi, Chinese
Restaurant 3 - North Indian, Mexican, Chinese
that is in Restaurant 2 Chinese is in Order1, in Restaurant 1 Chinese is in Order1 following other cuisine, in Restaurant 4 Chinese is in Order2 and in Restaurant 3 Chinese is in Order3
So can anyone plz help me how to write query for retrieving Search results like the above.
In Restaurants table I have Cuisine Id.
Also tried using separate table for storing Cuisine ID of Restaurants (ie if Restaurant 1 has Restaurant ID 20 and with 2 Cuisines the details will be stored as follows:
Rest Id Cuisine ID
20 45
20 24
Please help me to solve the above...
Regards,
Snigdha


