findSql分页查询出来的中文乱码,怎么破

#1 土坷垃

$this->rs = $db->spPager($this->spArgs('page', 1), 20)->findSql('select h_line.* from h_line');

会出现中文乱码,头部还有大段错误提示
QQ截图20160813135905.jpg

$this->rs = $db->spPager($this->spArgs('page', 1), 20)->findAll();
这样就正常

2016-08-13 13:57:06

#2 土坷垃

乱码问题已经解决,是浏览器的问题
错误还是有



( ! ) Strict standards: Only variables should be passed by reference in F:\php\speedphp\SpeedPHP\Core\spModel.php on line 436


Call Stack




Time

Memory

Function

Location

1 0.0000 146648 {main}( ) ..\admin.php:0
2 0.0130 460224 spRun( ) ..\admin.php:41
3 0.0340 562872 line->index( ) ..\spFunctions.php:21
4 0.0360 576184 findSql ( ) ..\line.php:10
5 0.0360 576384 spPager->__call( ) ..\line.php:10
6 0.0360 576432 spPager->runpager( ) ..\spModel.php:413



( ! ) Strict standards: Only variables should be passed by reference in F:\php\speedphp\SpeedPHP\Core\spModel.php on line 436


Call Stack




Time

Memory

Function

Location

1 0.0000 146648 {main}( ) ..\admin.php:0
2 0.0130 460224 spRun( ) ..\admin.php:41
3 0.0340 562872 line->index( ) ..\spFunctions.php:21
4 0.0360 576184 findSql ( ) ..\line.php:10
5 0.0360 576384 spPager->__call( ) ..\line.php:10
6 0.0360 576432 spPager->runpager( ) ..\spModel.php:413

2016-08-13 13:59:33

#3 gxnnhuzz

这个要改一下,jake偷懒把几步写到一步了,不过这只是个警告,你把错误显示关当它不存在好了,也不会有什么问题

2016-10-23 15:24:34

#4 why1015

$arr = $this->model_obj->findSql("SELECT COUNT({$this->model_obj->pk}) as sp_counter FROM ($conditions) sp_tmp_table_pager1");
                        $pop = array_pop( $arr );
                        $total_count = array_pop( $pop );

spModel.php的436行改为这样就可以了,直接套在一起会出错

2016-12-02 11:06:53