How can I do a search for all records that the field "Mobile" is not equal to "fixed".
Jun 9, 1999, 11:17 AM
Veteran / Moderator (8669 posts)
Jun 9, 1999, 11:17 AM
Post #2 of 7
Views: 2626
Jun 9, 1999, 2:28 PM
Veteran / Moderator (8669 posts)
Jun 9, 1999, 2:28 PM
Post #5 of 7
Views: 2636
Well, "or" searches are easy. It's just a regular expression --this|that. "And" searches require a whole structure with nested "if"s for each possibility--
"this and that"
becomes
if ("that" is there {
this is a record we want
}
}
If you had "this and that and the other thing" you'd have to have three nested "if"s and so on. I'm going to be very interested in looking at that code when it's ready.
"Not" searches require an extra structure, too, because at least I can't figure out how to do a "not" in a regular expression. What would have to happen is that the search would have to go through and pick all the things that worked for the rest of the search and then go through the hits and delete the ones that matched the "not." Even if the only search term was a "not," I think it would have to gather the whole database and go through it again. At least I think that's how it would work.
At this point, my mind boggles at the thought.
------------------
JPD
"this and that"
becomes
Code:
if ("this" is there) { if ("that" is there {
this is a record we want
}
}
If you had "this and that and the other thing" you'd have to have three nested "if"s and so on. I'm going to be very interested in looking at that code when it's ready.
"Not" searches require an extra structure, too, because at least I can't figure out how to do a "not" in a regular expression. What would have to happen is that the search would have to go through and pick all the things that worked for the rest of the search and then go through the hits and delete the ones that matched the "not." Even if the only search term was a "not," I think it would have to gather the whole database and go through it again. At least I think that's how it would work.
At this point, my mind boggles at the thought.
------------------
JPD
Jun 10, 1999, 12:49 AM
User (429 posts)
Jun 10, 1999, 12:49 AM
Post #6 of 7
Views: 2645
Oh, I know you can do that in the search form, I just meant that it'll be great when the new version comes out if it has Boolean style operators, since people are so used to using them on the search engines. Most people who'll be searching one of our databases wouldn't have a notion how to use regular expressions to search it. For instance, I log search terms on one of my sites and people regularly use something AND something OR something, but that won't work...
And surely it wouldn't be that difficult to add a Boolean NOT or minus to dbMan, wouldn't he just have to make stuff not equal (ne) to the regular expression created by the search terms?
Anyway, I ramble. Better be off to do some of that "work" thing...
adam
And surely it wouldn't be that difficult to add a Boolean NOT or minus to dbMan, wouldn't he just have to make stuff not equal (ne) to the regular expression created by the search terms?
Anyway, I ramble. Better be off to do some of that "work" thing...
adam
Jun 10, 1999, 10:13 AM
Veteran / Moderator (8669 posts)
Jun 10, 1999, 10:13 AM
Post #7 of 7
Views: 2630
Yes, you're right.
I really haven't looked into how the search works much.
It looks like the "not" searches would require a structure much like the "greater than" and "less than" structures. I might be able to work on that this weekend.
You can allow "or" searches without using the regular expressions, though, right now. I posted the code just this week, I think. If you can't find it, let me know and I'll give it a try.
------------------
JPD
I really haven't looked into how the search works much.
It looks like the "not" searches would require a structure much like the "greater than" and "less than" structures. I might be able to work on that this weekend.
You can allow "or" searches without using the regular expressions, though, right now. I posted the code just this week, I think. If you can't find it, let me know and I'll give it a try.
------------------
JPD