Can't find custom block php code in the database I've created a custom block in Drupal 7, to display, in the upper right corner on every page, a menu that is context sensitive.  Based on certain user attributes some functionalities are enabled or disabled.  This block displays a list of available functionality to the user.

small example:

&lt;li&gt;&lt;a href="?q=node/add/article"&gt;write new article&lt;/a&gt;&lt;/li&gt;
&lt;?php 
    if (og_is_member('node', 12, 'user')){
        print('&lt;li&gt;&lt;a href="?q=board"&gt;Board of directors&lt;/a&gt;&lt;/li&gt;');         
        print('&lt;li&gt;&lt;a href="?q=admin/reports/pages"&gt;statistics&lt;/a&gt;&lt;/li&gt;');
    }       
?&gt;
&lt;?php
  global $user;

  // Check to see if $user has the administrator role.
  if (in_array('content_manager', array_values($user-&gt;roles))) {
            print('&lt;li&gt;&lt;a href="?q=comment_review"&gt;Manage comments&lt;/a&gt;&lt;/li&gt;');
  }
?&gt;
&lt;a href="?q=user/logout"&gt;Log out&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


I've noticed that when I make an SQL dump on the live site and put it on my laptop's local database for backup, this context sensitive menu is not there, while on the production site it displays just fine.
first I thought I just had to readjust the visibility settings of this new block on the backup site.  But when I visited admin/structure/blocks the block wasn't even there.  So I figures something must have gone wrong with the sql dump.  So I tried again, still no block in the list.
This new block's name is 'nav_menu_block', so I did a text search on the sql dump from the production site.  Nothing....
So I googled a bit to find out where the data for custom blocks is stored.  Found a few web pages stating this is stored in the table "block_custom".  But when I go there with phpMyAdmin, this table is empty.

So now I have this problem:  if I ever have to put the backup version up again it will not contain this new block, and who knows what else will be missing....

Can anyone PLEASE tell me where to find the data for this custom block with PHP code in the database?

many thanks
Universal solution to find something you know is in the database is:


Dump the entire database to SQL file.


No compression, or uncompress after downloading.
Use one row - one line format - disable "insert many rows in one INSERT statement" and similar options.
Also, disable anything that looks like "save BLOB columns in hex format" - you want serialised variables in human-readable form.

Use grep or similar text search tool to search for the string parts you think characteristic enough to the row you need to find.