Gossamer Forum
Home : Products : DBMan : Discussions :

> and < as a databasevalue

Quote Reply
> and < as a databasevalue
Hi,
I'm having a problem with searching my database because some fields contain values like: <1.000.0000 and >10.000.000
When searching on these conditions strange results turn up. I think it has to do with < being an HTML-character. I've tried changing those < and > in &_lt and &_gt (without the underscore) but that gives also strange results, i think because it contains & which is a typical CGI character for dividing the string which is send from client to the server into variables. So how to solve this??
i would be glad if someone could help me with this.

Pieter Overbeeke

Quote Reply
Re: > and < as a databasevalue In reply to
> and < characters are used in DBMan for ranged searches, so if you have a field with a value of >10.000.000 and try to search on it you will turn up all fields with a value greater than 10.000.000, which may explain your weird results...

You might need to concider using a different character.

Hope this clears things up,

- Mark



Astro-Boy!!
http://www.zip.com.au/~astroboy/
Quote Reply
Re: > and < as a databasevalue In reply to
Thanks, now I understand the problem!
greetings, Pieter

Quote Reply
Re: > and < as a databasevalue In reply to
I think you may want to setup your fields as ranges to do your searching.

If you check out the FAQ noted below and look under "Searching" and then topic for setting up search ranges, you will also find the syntax needed to remove these characters from your display.

You might also want to look under the section called "Syntax".

Hope this helps

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: > and < as a databasevalue In reply to
Hi,
I do not want to search a range, i want to search on exact values. These values are the following:
<1.000.000
1.000.000 - 5.000.000
5.000.000 - 10.000.000
10.000.000 - 20.000.000
>20.000.000

These are only values a specific field can have. Now i want to search my database on that field, so i search on these exact values. But when i search on the exact value "<1.000.000" or ">20.000.000" then i think that DBman interpretes this as a range search, and doing such a rangesearch on an alphanumeric field can give strange results i think. I've changed the ">" and "<" in "smaller then" and "greater then" and now it works fine, but if anybody has got a solution for this so that I can use "<" and ">" again, then i would appreciate that!
Thanks anyway!

greetings, Pieter