New topic: search listbox data
<http://forums.realsoftware.com/viewtopic.php?t=47204> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message carlbutler7 Post subject: search listbox dataPosted: Thu Mar 07, 2013 3:12 pm Joined: Tue Jan 08, 2013 8:27 pm Posts: 36 hi, ive tried looking through this forum and google but can't find any information i can understand i have a listbox called listbox1 i have a editfield called search i have a button called searchbutton i want to search the contents of the listbox (the listbox is populated by mysql database) but the listbox also shows information from other tables within my database when certain buttons are pressed so i dont think a sql statement will work. can someone please help me thanks carl Top ktekinay Post subject: Re: search listbox dataPosted: Thu Mar 07, 2013 3:36 pm Joined: Mon Feb 05, 2007 5:21 pm Posts: 504 Location: New York, NY If I understand the situation, you have a single ListBox and use several SQL queries against various tables in your database to populate it. Now you want to filter this "combined" data to limit what's displayed to just the search term. Is that it? If so, first, I'd want to make sure you couldn't combine your SQL queries right now. If you could do that, you could limit the results and repopulate your ListBox, and that's probably the better way to do it. The next way to do it would be to add the filter term to each individual SQL query and then repopulate the ListBox with the new, limited data. Otherwise, you'd loop through your ListBox rows, working bottom to top, and delete those rows that don't match the filter. Or you'd repopulate your ListBox but make sure the code that inserts rows checks against the filter term as it decides whether to insert a particular row or not. _________________ Kem Tekinay MacTechnologies Consulting http://www.mactechnologies.com/ Need to develop, test, and refine regular expressions? Try RegExRX. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
