zendframework中文字段进行筛选,取不出mysql中文字段,英文和数字字段都可以
以下是IndexController.php控制器部份,这部份用中文字段进行筛选,无法取出记录
<?php
require_once 'Zend/Controller/Action.php';
require_once 'application/models/goods.php';
require_once 'application/models/db.php';
require_once 'BaseController.php';
class IndexController extends BaseController
{
function indexAction()
{
$this->view->title='aaaa';
$goods=new goods();
$dbs=$goods->getAdapter();//适配器查询返回的数据是数组
$cname="索尼高性价比入门单反 A580 单反相机【演示数据】";
$res=$dbs->query("select * from shopnc_goods where goods_name=".$dbs->quote($cname)." limit 0,9")->fetchAll();
echo "<pre>";
print_r($res);
echo "</pre>";
exit();
}
}