Php 需要帮助使用laravel筛选阿拉伯语数据库记录吗
我试过一个包裹,但对我没用Php 需要帮助使用laravel筛选阿拉伯语数据库记录吗,php,mysql,laravel,Php,Mysql,Laravel,我试过一个包裹,但对我没用 $mode="1"; $Arabic = new Arabic(); $Arabic->setQueryStrFields('text'); $Arabic->setQueryMode($mode); $keyword = str_replace('\"', '"', $string); $strCondition = $Arabic->arQueryWhereCond
$mode="1";
$Arabic = new Arabic();
$Arabic->setQueryStrFields('text');
$Arabic->setQueryMode($mode);
$keyword = str_replace('\"', '"', $string);
$strCondition = $Arabic->arQueryWhereCondition($keyword);
$strOrderBy = $Arabic->arQueryOrderBy($keyword);
$result=DB::table('verses')->select(DB::raw('text',$strCondition,$strOrderBy))->limit(10)->get();
我有这样的数据库,我想搜索一个特定的字符串使用laravel,但得到的结果是空的,请给我一个建议来处理这个
我使用的是laravel 8
其中('text'、'like'、'%iٱللهِِ%')
不,它不起作用,我这样做了这回答了你的问题吗?还有。。。
$mode="1";
$Arabic = new Arabic();
$Arabic->setQueryStrFields('text');
$Arabic->setQueryMode($mode);
$keyword = str_replace('\"', '"', $string);
$strCondition = $Arabic->arQueryWhereCondition($keyword);
$strOrderBy = $Arabic->arQueryOrderBy($keyword);
$result=DB::table('verses')->select(DB::raw('text',$strCondition,$strOrderBy))->limit(10)->get();