Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot excute translatedQuery. #170

Open
fantasy2210 opened this issue Nov 27, 2012 · 0 comments
Open

Cannot excute translatedQuery. #170

fantasy2210 opened this issue Nov 27, 2012 · 0 comments

Comments

@fantasy2210
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant