Good Day to All!
I am interested to use Yii and I would like to know if this is possible in Yii Framework.
I would like to retrieve the data using SQL from the database then display the data by page and the field columns
could be sorted and filter the data by putting filters above each column just like in the Yii Tour - 3rd Stop
Can this be done easily in Yii?
If you have other ways to do it please post it here, like using AJAX in retrieving the data.
By the way the code that retrieves the data from the database should be in the model not in the View.
Thanks in advance.
(Maurizio Domba Cerin)
January 5, 2011, 2:19pm
I don’t realy understant your question… if you have seen the 3rd screencast… there you can see how to build that with Yii… and you already seen that it can be done…
January 6, 2011, 9:49am
Maybe you’re looking for a CSqlDataProvider? Data providers are interchangeable. So in the search() method of your model you can create any type of data provider you want and are not bound to CActiveDataProvider.
August 18, 2011, 6:16am
Maybe you are looking for CArrayDataProvider (instead of SqlDataProvider) if you hasn’t linked your query to a particular model :
Check this thread