You are here

function views_block_load_multiple in Views Hacks 7

Entity API functions for blocks.

1 call to views_block_load_multiple()
views_block_load in views_block/views_block.module

File

views_block/views_block.module, line 74

Code

function views_block_load_multiple($bids = array()) {
  $result = db_query("\n  SELECT \n    b.*, \n    box.body, \n    box.info, \n    box.format \n  FROM \n    {block} b LEFT JOIN {block_custom} box ON b.delta = box.bid \n  WHERE \n    b.bid IN (:bids)\n  ", array(
    ':bids' => $bids,
  ));
  $blocks = $result
    ->fetchAllAssoc('bid');
  return $blocks;
}