sai rama Posted March 23, 2011 Share Posted March 23, 2011 hi sir, I want to filter the dropdownlist by applying the where conditions of sql. I did not get enough idea of writing the criteria . Please explain me where to write the criteria and how to write. Thanks a lot. Link to comment Share on other sites More sharing options...
Larry Posted March 23, 2011 Share Posted March 23, 2011 Filter what dropdownlist? How about showing some code? How about reading and abiding by the forum guidelines? Link to comment Share on other sites More sharing options...
sai rama Posted March 24, 2011 Author Share Posted March 24, 2011 Hi sir, I want to filter data from database and display them. For example if i have a table with fields (name,block...) name-suma block-B name-ravi block-B name-raju block-A Now i need to display the data of only those who have the block name as B . I am not understanding how to perform it sir. Please help me. Link to comment Share on other sites More sharing options...
Terry Posted March 30, 2011 Share Posted March 30, 2011 I do NOT know Yii so I maybe stepping out of line with answering this but strictly for the SQL call this is what you need SELECT * FROM 'database_name.table_name' WHERE block = 'block-b' That will retrieve all records from the table that are categorized as being in block-b. That is strictly the SQL statement though I do not know what form Yii would need that in. 1 Link to comment Share on other sites More sharing options...
Recommended Posts