Hi Friends,
any one knows how to search multiple fields insql database table .
i have table like
string str2 = "select cld_id,cld_name,cld_adrs,cld_ctno,cld_cmdty,cld_tng,cld_state,cld_dst,cld_dof,cld_pby,cld_moc from coldstorage";
then i have checkbox list hear i have bind cld_name, dropdownlist hear i bind cld state and dropdown i bind cld_dst...
so now i want to select one or two ckeckboxes and i select state and distric
then i click searchbutton i want to show searching values in gridview
please give any idea how to search multiple fileds sqlquery
please any one helpm.
How to search multiple fields in sql database table and i will show in grid view
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Zoran HorvatRank #792 · 2.9K reputationPosted Jul 29, 2011, 12:18 AM EDT
where cld_name='name' and cld_state='state';
This would search by name and state only. You can extend the query by adding and removing search fields as you wish.
Zoran