Closed wehowski closed 1 year ago
Hello,
this is the replacement of the natOrder() functionality: (Example)
$res = OIDplus::db()->query("select * from ###objects where parent = ?", array($obj->nodeId()));
$res = new OIDplusNaturalSortedQueryResult($res, 'id');
while ($row = $res->fetch_array()) {
Danke!!! I changed it to:
public function raHasFreeWeid($email, $getId = false){
$res = OIDplus::db()->query("select id from ###objects where ra_email = ? and id like ?",
array($email, self::getFreeRootOid(true).'.%'));
$res = new OIDplusNaturalSortedQueryResult($res, 'id');
while ($row = $res->fetch_array()) {
return (true === $getId) ? $row['id'] : true;
}
return false;
}
@wehowski
Sorry, there will be yet another major update to the database handling which changes
$res = new OIDplusNaturalSortedQueryResult($res, 'id');
to
$res->naturalSortByField('id');
Works! Thank you!
Hello Daniel, after updating to svn-1149 I got Call to undefined method ViaThinkSoft\OIDplus\OIDplusDatabaseConnectionMySQLi::natOrder() in my freeweid Plugin.
So I changed
to:
So far so well.
But I am not really sure how to change this method correctly:
Can you give me a hint how to replace OIDplus::db()->natOrder('id') the right way?
Thank you!!!