PHP problems with COLLATE ?
OK, so I have this PHP code:
if ($dbc->multi_query($s)){
$ret = array();
if($res = $dbc->store_result()){
$no = $res->num_rows;
for($i = 0; $i < $no; $i++){
$ret[$i] = $res->fetch_assoc();
}
if($res){
$res->close();
}
return $ret;
}
}
else{
echo 'Query failed: '; var_dump($s);
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
}
exit;
return FALSE;
}
IF I set $s="SELECT * FROM view_cl_all WHERE (cl_name LIKE '%al%' )"it's working, i get a number of results.
But if $s="SELECT * FROM view_cl_all WHERE (cl_name LIKE '%al%' COLLATE utf8_general_ci)"
Then query silently fails. Goes directly to the else section, diplays 'Query failed: ', but no mysqli error !!!!
BUT, in Query Browser both work... I don't get it !
Subject
Views
Written By
Posted
11797
July 22, 2006 04:33AM
4218
July 22, 2006 06:05AM
3975
July 25, 2006 08:18AM
3940
July 26, 2006 01:43AM
3507
July 26, 2006 01:08PM
3439
July 26, 2006 11:29PM
3202
July 26, 2006 11:40PM
3169
July 26, 2006 11:51PM
3162
July 27, 2006 12:49AM
PHP problems with COLLATE ?
5199
July 27, 2006 01:21AM
2728
July 28, 2006 03:26AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.