|
Posted by Senator Jay Billington Bulworth on 05/30/07 03:06
On Sun, 27 May 2007 20:59:48 GMT, "Andy" <system.support@ntlworld.com>
wrote:
>I have created several HTML forms to query my MySQL database using PHP, all
>is good except for one field which does not return the values expected. The
>field in the table is set as VARCHAR(20) since it needs to store part
>numbers and these are in the format AA100-ZZ9999 (with some exceptions which
>start with 3 alpha characters followed by 6 numeric). When I search for 100
>I get no results but when I search for AA the correct results are returned.
What do your queries look like? Offhand I suppose you're probably
wanting a
WHERE field LIKE '%100%'
type query, but using something else.
>Also is there a way of making PHP forms acting on a MySQL database not case
>specific?
In terms of searching, this is the default behavior. When you persist
data, it will be saved using whatever case was provided by the user,
but when you query against the data, your queries will be
case-insensitive by default.
hth
Bulworth : funha@fung.arg | My email address is ROT13 encoded, decode to mail.
--------------------------|---------------------------------------------------
Brillant Developer && DBA | Public releases now @ <http://www.drunkwerks.com/>
Navigation:
[Reply to this message]
|