function nodequeue_get_subqueue_position in Nodequeue 6.2
Same name and namespace in other branches
- 5.2 nodequeue.module \nodequeue_get_subqueue_position()
- 7.3 nodequeue.module \nodequeue_get_subqueue_position()
- 7.2 nodequeue.module \nodequeue_get_subqueue_position()
Get the position of a node in a subqueue, or 0 if not found.
8 calls to nodequeue_get_subqueue_position()
- NodequeueAPISubqueueUnitTest::testNodequeueQueueBack in tests/
nodequeue.test - NodequeueAPISubqueueUnitTest::testNodequeueQueueDown in tests/
nodequeue.test - NodequeueAPISubqueueUnitTest::testNodequeueQueueFront in tests/
nodequeue.test - NodequeueAPISubqueueUnitTest::testNodequeueQueueSwap in tests/
nodequeue.test - NodequeueAPISubqueueUnitTest::testNodequeueQueueUp in tests/
nodequeue.test
File
- ./
nodequeue.module, line 1233 - Maintains queues of nodes in arbitrary order.
Code
function nodequeue_get_subqueue_position($sqid, $nid) {
// We use MIN to make sure we always get the closes to the front of the
// queue in case the queue has nodes in it multiple times.
$pos = db_result(db_query("SELECT MIN(position) FROM {nodequeue_nodes} WHERE sqid = %d AND nid = %d", $sqid, $nid));
return $pos;
}