Re: search field into MySQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



WOW, that was easy enough, just declaire column NOT BINARY to make all
searches case insensitive

Thanx,
Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching????
"Peter Beckman" <beckman@purplecow.com> wrote in message
20021024151411.W1216-100000@thermonuclear.org">news:20021024151411.W1216-100000@thermonuclear.org...
> It is a database setting.
>
>
http://www.mysql.com/documentation/mysql/bychapter/manual_Problems.html#Case
_sensitivity
>
> Peter
>
> On Thu, 24 Oct 2002, Seabird wrote:
>
> > Hi everyone,
> >
> > I'm encountering a problem searching a DB. I wish for the input to not
be
> > case sensitive. if someone looks for AA they may also type aa or aA or
Aa.
> > This one is simple because its 2 or three letters.
> >
> > I also have entries that contain "Aviation Management Corporation" they
> > should not be searched by case sensitive. How to do this. Convert the DB
> > (23000 entries) or change some code....
> >
> > Here is my "result" code:
> >
> > print "<table border=1>\n";
> > $query = "SELECT * FROM $table WHERE Field1 LIKE '%$icao%' $ton
> >     Field2 LIKE '%$name%' $ton2
> >     Field3 LIKE '%$country%'
> >     ORDER BY $sort";
> > $result = mysql_query($query) or die("Error in query");
> >
> > while($row = mysql_fetch_assoc($result)){
> >  print "<tr>\n"
> >           ."<td>" . $row['Field1'] . "</td>\n"
> >    ."<td>" . $row['Field2'] . "</td>\n"
> >    ."<td>" . $row['Field3'] . "</td>\n"
> >    ;
> > }
> >
> > Thanx,
> > Jacco
> >
> > print "</tr></table>";
> >
> >
> > --
> > http://seabird.jmtech.ca
> >
> > Attitude is Everything!
> > But Remember, Attitudes are Contagious!
> > Is Yours worth Catching????
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --------------------------------------------------------------------------
-
> Peter Beckman            Systems Engineer, Fairfax Cable Access
Corporation
> beckman@purplecow.com
http://www.purplecow.com/
> --------------------------------------------------------------------------
-
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux