2014年7月13日 星期日

[RESOLVED] Best way to save user search to the database and retrieve it


Hello Experts,


Please suggest me the best way of doing this.


I have a web form, from which user can do a search of all the realtors(using some filters) in a particular state. 


Now, the requirement is to allow the user to save this search to the database, and show it to them as part of the saved searches, so that user can just click on this search and look at the results without having to enter the search criteria again. 


What is the best way of doing this? 


I am not sure if this is right and if so, if it is the best approach. Do you recommend creating a class based on this search criteria, serialize it and save it to the database as an XML, which can be deserialized later...?? 



I guess you'd create a database table which has fields for all the search field you have in your page, plus the user id. You'd then be able to use this take to display the history of searches the user had made. 


沒有留言:

張貼留言