Last post Jul 26, 2010 10:51 PM by shirleja
Jul 26, 2010 07:57 AM|shirleja|LINK
I got table name ( customer ) and field Name as ( customerId , companyName , personName and poscode ) in Mysql
Now i have created search function by using textbox (txtCompanyName.Text) like where i can query companyName by entering data to textbox to search .
qry = "select * from customer where companyName='" + txtCompanyName.Text + "'";
Bt i want to do search by using 1 dropdownlist (companyName , personName, poscode) . For example i select dropdownlist as companyName and enter the name in textbox and search. After that i select the same dropdownlist with personName field
and enter the name of the person and search .
How to do that and what is the mysql query for such case ? Please help . Thanks a lot
Jul 26, 2010 10:21 AM|karan@dotnet|LINK
qry = "select * from customer where "+ DropDownList1.SelectedItem.Text+ "= '"+ txtCompanyName.Text + "'";
Jul 26, 2010 10:51 PM|shirleja|LINK
Thanks a lot and its working now . thanks again to you and asp.net forum ....