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:
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
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:
Code:
$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