Possibly, thanks for sharing! We'll dig a bit more in the meantime.
Thx again!
Code: Select all
# $db = \cms_utils::get_db(); // may or may not be needed...
$query = 'SELECT MAX(item_id) FROM '
. \cms_db_prefix()
. 'module_' . $mod->_GetModuleAlias() . '_item';
$last_id = (int)$db->GetOne($query);