A "search" control
Posted
#1
(In Topic #1148)
Regular

- What, in your experience, is the best example of a search control? Note, this doesn't need to be for a database, just some good ideas. For example the generic web browser search when looking at a pdf file isn't too bad but could be better. On the other hand the LibreOffice "Writer" search is a total overkill and I still can't get wildcard searches to work anyway.
- I'm very good with postgres and fairly angry with sqlite but do the other databases support the postgres "ilike" operator? N.B. Not a typo!
- What do you think about wildcarding? I would like to support some level of wildcards anywhere in the search term without resorting to bloody regular expressions. I am thinking of using something like "??" as a wildcard for anything, is that sensible (from a user point of view)?
All the internals I can handle.
b
Posted
Guru

I have always relied on CSV files to store data. They do have their downsides, but they are fast and don't take up much room.
What do you think about wildcarding? I would like to support some level of wildcards anywhere in the search term without resorting to bloody regular expressions. I am thinking of using something like "??" as a wildcard for anything, is that sensible (from a user point of view)?
I presume you are looking to provide a search facility to people that might not grasp wild cards, regular expressions etc. Well, below is how I do this. The attached program only requires is a text entry (it is not case-sensitive), with an option for a second search.
Run the program enter australia in the first search. This will bring up 34 results. If you now add a second search raymond you will filter the search to a single row. This sample 'CSV database' contains 10,000 lines. All the data is false and just for demonstration purposes.
<IMG src="https://www.cogier.com/gambas/Search1.png">
</IMG>
1 guest and 0 members have just viewed this.


