Jump to content

Odd field search


aeroswat

Recommended Posts

I have a field in my database that contains eye information as it pertains to being blind or not. The records can have values like so:

 

CF - Counting Fingers

NIL - Totally blind

 

or the field can have an eye prescription like such

20/200

or 20/20

etc...

 

I want two sql statements

one to be able to pull up the records on people who have any letter acronym or greater than or equal to a 20/200 visual acuity

and another to pull up the records of people who have less than a 20/200 visual acuity

Link to comment
https://forums.phpfreaks.com/topic/185239-odd-field-search/
Share on other sites

Well, that doesn't make it simple at all -- fields are free.

 

Regardless, show us all of the versions that you'd like to query.

 

Sorry I read your signature link with the rules  :-\ realize I didn't put the MySQL version in there before. My version says 5.0.81-community

Link to comment
https://forums.phpfreaks.com/topic/185239-odd-field-search/#findComment-977992
Share on other sites

I think what he means by version is the possible data in that column, i.e. CF, NIL, 20/200, 20/20, etc.

 

In order to query on it, all possible variations must be know.

 

I can say that getting a query to understand greater than/less than on 20/200 is going to be a bit of a pain.

 

Link to comment
https://forums.phpfreaks.com/topic/185239-odd-field-search/#findComment-978002
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.