flourishlib / flourish-classes

The class files for Flourish
http://flourishlib.com
182 stars 78 forks source link

Cannot excute translatedQuery. #170

Open fantasy2210 opened 11 years ago

fantasy2210 commented 11 years ago

I use flourishlib in my project, MSSQL database, when I execute the command:

$sql = "WITH pagination AS ( SELECT ROW_NUMBER() OVER (ORDER BY Mataisan) AS RowNumber, Mataisan, Nhomtaisan, Ghichu, Maloaitaisan, DVCQ, Donvitinh,ChuthichTS,DuAn_Truong,LoaiHinh FROM TaiSan ) SELECT * FROM pagination where RowNumber BETWEEN 5 AND 8"; return $this->db->translatedQuery($sql);

an error message appears as follows:

0 /home/nttoan/www/win_share/mvc/libs/fDatabase.php(2564): fDatabase->checkForError(Object(fResult), NULL) #1 /home/nttoan/www/win_share/mvc/libs/fDatabase.php(3027): fDatabase->performQuery('WITH pagination...', Object(fResult), Array) #2 /home/nttoan/www/win_share/mvc/libs/fDatabase.php(3325): fDatabase->run('WITH pagination...', 'fResult') #3 /home/nttoan/www/win_share/mvc/models/taisan_model.php(21): fDatabase->translatedQuery('WITH pagination...') #4 /home/nttoan/www/win_share/mvc/controllers/taisan.php(11): TaiSan_Model->taiSanList() #5 /home/nttoan/www/win_share/mvc/libs/Bootstrap.php(155): TaiSan->index() #6 /home/nttoan/www/win_share/mvc/libs/Bootstrap.php(31): Bootstrap->_callControllerMethod() #7 /home/nttoan/www/win_share/mvc/index.php(21): Bootstrap->init() #8 {main}

However, if you use $ this-> db-> query ($ sql) then everything is ok.UTF8 is required in my project, looking forward to your help.