Re: Case-insensitive SELECT
| From: | Doug Semig | Date: | Tue, 15 Aug 2000 21:52:42 +0000 |
| Subject: | Re: Case-insensitive SELECT | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-2069@lists.php.net to get a copy of this message | ||
Could you test to see if this works:
SELECT ... WHERE UPPER(fieldname) LIKE UPPER('value')
Doug
David B. Small was heard at 12:57 PM 8/15/00 -0700 to say:
>Apologies in advance for what is assuredly a naive question.
>
>I think I understand the SELECT...WHERE...LIKE query form (although I'm
>still not sure why, with ODBC at least, I must use % instead of *...or why
>it even works)
>
>But suppose I want to find all rows of "table" in which "field" is
>"Field
>Name"....
>
>I'd use "SELECT * FROM tale WHERE field='Field Name'"
>
>If I now wanted it to match on 'Field Name', "Field name", "field
>name",
>"Field" etc., but not "Field Value"
>
>I could do some string manipulations, and perform many selects.
>But is there a more efficient way of expressing wildcards (either in SQL or
>in PHP's interface to it)?
>(eg, I'd love to say field LIKE [F|f]ield[| [N|n]ame] or something like
>that)
>
>-----------------
>David B. Small
>dbsmall@alumni.haas.org
>
>