function _node_limit_next_limit_id in Node Limit 7
Same name and namespace in other branches
- 8 old/node_limit.module \_node_limit_next_limit_id()
- 6 node_limit.module \_node_limit_next_limit_id()
Helper function to get the next available node limit id.
2 calls to _node_limit_next_limit_id()
- node_limit_clone_limit in ./
node_limit.module - Callback to clone a limit.
- node_limit_limit_form_submit in ./
node_limit.module - Submission hook for node_limit_limit_form.
File
- ./
node_limit.module, line 638
Code
function _node_limit_next_limit_id() {
$select = db_select('node_limit', 'nl');
$select
->addExpression('MAX(lid)+1', 'lid');
$query = $select
->execute();
$next_lid = $query
->fetchField();
return max($next_lid, 1);
}