Drupal(.module file) &lt;?php
/**
Provides a block with query and store in database
*/
/**
* Implementation of hook_help().
*/
function demo_help($path,$args)
{
if($path=='admin/help#demo')
{
return t('To use this module, go to block page and turn on the       demo');
}
}

function demo_block_info()
{
$blocks=array();
$blocks['demo_member']=array(
'info'=&gt;t('Demo member'),
'cache'=&gt;DRUPAL_NO_CACHE,
);
return $blocks;
}

/**
* Implements hook_block_view().
*/
function demo_block_view($name)
{
if($name=='demo_member')
{
//$format2 = 'g:i a';
$content=db_query("SELECT entity_id FROM     {field_data_field_category_status}")-&gt;fetchField();
            $content.='';
            $block=array(
            'subject'=&gt;t('Member'),
            'content'=&gt;$content,
            );
            return $block;
    }

}
?&gt;


i need to display 3 records by fetching array(.module file)
i am getting single record:
Member
1
i should get below
Member
1
2
3
Change 

$content=db_query("SELECT entity_id FROM {field_data_field_category_status}")-&gt;fetchField();
$content.='';


to

$records = db_query("SELECT entity_id FROM {field_data_field_category_status}")-&gt;fetchCol();
$content = implode('&lt;br /&gt;', $records);


At the moment you're just getting the first record from the result set, not all of them.

As a side note, going directly into field tables isn't the best idea. Have a look at EntityFieldQuery for an alternative.