Discussion: Case sensitivity
Afficher un message
Vieux 23/09/2007, 18h42   #2
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Case sensitivity

JimJx wrote:
> Hi all,
>
> I know that searches in MySQL are supposed to be case insensitive so
> this is driving me nutz...
>
> Quick run down...
>
> 1 table, 13 columns.
> Columns 1 - 12
> are type text
> collation is latin1_swedish_ci
> Column 13
> Set to mediumint autoincrement, primary key
> collation is latin1_swedish_ci
>
> So, I am searching with this:
>
> $query = sprintf (
> "SELECT name,address,city,phone, category
> FROM valley
> WHERE CONCAT_WS(' ',keywords,category) LIKE '%$search
> %'
> ORDER BY name LIMIT %d,%d",
> $start - 1,
> $per_page + 1);
> }
>
> The $search comes from a form. For example, if I enter 'books' in the
> form I get no results. However, if I enter 'Books' in the form, I get
> 5 results, which is what I would expect from my db.
>
> I know this got a little long, but I wanted to show what I had checked
> and the outcome of everything.
>
> If anyone has any ideas as to why this search is being case sensitive,
> I would love to hear them. Or alternatively if anyone has a
> workaround, that would also be greatly appreciated.
>
> Jim
>


What's your CREATE TABLE look like?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  Réponse avec citation
 
Page generated in 0,05677 seconds with 9 queries