View Full Version : how to search a entry from database using input box and combobox.
vijay4781
04-28-2007, 11:58 AM
how to search a entry from database using input box and combobox. when we enter a name starting with 'A' in inputbox in under it a combobox displays all the names starting with 'A' . what is the code ...
Here is a query:
"SELECT id,name FROM users WHERE name LIKE '"..Input.GetText("Input1").."%'; LIMIT 600"
Polulate the results to the combobox.
RizlaUK
04-28-2007, 01:04 PM
yeah, it took me a while to understand how to search a database but its actually very easy
where blue points out, the key word is "LIKE"
vijay4781
04-28-2007, 09:59 PM
plz post a project with this code ..please...
You can not learn anything if you do it like that. Try making it yourself and then, if stuck, post the code that you can not make to work. Which part of the problem you do not understand? I'm sure you can place Input and ComboBox on the pane. You need to put the code on the Input's OnKey event. Also, you need to firstly open or connect to the database.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.