How to get values of delta field from "block" table in drupal 7 from the database for the activated theme in a custom module? Can I get all the values of delta field from "block" table from the database in my custom module 

I have tried with this code as clive has explained it here but it shows me an error:

 $query = db_select('module__block', 'b')
  -&gt;condition('theme', $business)
  -&gt;condition('status', 1)
  -&gt;condition('region', -1, '&lt;&gt;');


    $query-&gt;addExpression("CONCAT('_', delta)", 'delta');
    $deltas = $query-&gt;execute()-&gt;fetchCol();
    print_r($deltas);


module__block : Is the name of the block table since I attached a prefix to it.
SELECT delta, 
FROM  `module__block` 
WHERE theme LIKE  'business'
LIMIT 0 , 30 ;


shows only blocks.

SELECT delta, theme
FROM  module__block 
WHERE theme LIKE  'business'
LIMIT 0 , 30;

It will shows both the block names and theme name.