joon1
1
SELECT LEN('France');
The code above produces “6”.
But the code below produces " Error in SQL" because it contains non-English.
SELECT LEN('Français');
How can I get the length of non-English?
The followig is one of my trials for it, but failed.
SELECT mb_LEN('Français', 'utf8');
r937
2
for your last thread, you were using MySQL
unless you say otherwise, i will assume that you’re still using MySQL
there is no LEN function in MySQL
please, choose one of the valid ones (there are two) – String Functions and Operators
joon1
3
$key='ais'; $like="%$key%";
$sql="SELECT id, contents FROM myTable
WHERE contents like ?";
The code above produces the result below.
When I change the key from “$key=‘ais’” to “$key=‘ça’”, it procuces the result below.
I think that record (3) and record (6) should not be retrieved because they don’t have the key “ça”.
How can I produces my target result below with the key “ça”?
r937
4
again, i refer you to da manual – Character Sets and Collations in General
joon1
5
What character sets and collations are availabe?
I think utf-8 character sets and collations should be available.
I don’t know how to set utf-8 to it.
r937
6
please read the rest of that chapter
system
Closed
7
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.