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
11938
July 22, 2006 04:33AM
4284
July 22, 2006 06:05AM
4029
July 25, 2006 08:18AM
4017
July 26, 2006 01:43AM
3569
July 26, 2006 01:08PM
3502
July 26, 2006 11:29PM
3284
July 26, 2006 11:40PM
3231
July 26, 2006 11:51PM
3230
July 27, 2006 12:49AM
PHP problems with COLLATE ?
5288
July 27, 2006 01:21AM
2785
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.