今まで問題なく動作していた ethna の Ethna_AppObject::searchProp()、Ethna_AppManager::getObjectPropList() で別の環境で突然SQLのシンタックスエラーが。
nativecode=1064 ** You have an error in your SQL syntax near 'OFFSET 0' at line 1
未だに古い mysql server 3.23.58 を使っているサーバー。OFFSET句を記述できない?
互換性の切り替えはあるのか・・・。時間がないので、Ethna_AppObject から継承されている APPID_TABLEID.php 内のメソッドを↓こんな感じでオーバーライド。
nativecode=1064 ** You have an error in your SQL syntax near 'OFFSET 0' at line 1
未だに古い mysql server 3.23.58 を使っているサーバー。OFFSET句を記述できない?
互換性の切り替えはあるのか・・・。時間がないので、Ethna_AppObject から継承されている APPID_TABLEID.php 内のメソッドを↓こんな感じでオーバーライド。
function _getSQL_SearchId($filter, $order, $offset, $count){ ~ if (is_null($count) == false) { /// $limit = sprintf("LIMIT %d", $count); /// if (is_null($offset) == false) { /// $limit .= sprintf(" OFFSET %d", $offset); /// } if (is_null($offset) == false) { $limit = sprintf("LIMIT %d, %d", $offset, $count); } else { $limit = sprintf("LIMIT %d", $count); } } ~ } function _getSQL_SearchProp($keys, $filter, $order, $offset, $count){ ~ if (is_null($count) == false) { /// $limit = sprintf("LIMIT %d", $count); /// if (is_null($offset) == false) { /// $limit .= sprintf(" OFFSET %d", $offset); /// } if (is_null($offset) == false) { $limit = sprintf("LIMIT %d, %d", $offset, $count); } else { $limit = sprintf("LIMIT %d", $count); } } ~ }