I am trying to pull cms blocks that belong to a certain page. i saw that blocks are stored in cms_block and pages stored in cms_page. I tried to create a query that might help me pull this data.
SELECT cms_block.title FROM cms_page INNER JOIN cms_block ON cms_page.page_id = cms_block.block_id;
and
SELECT cms_page.title FROM cms_page INNER JOIN cms_block ON cms_page.page_id = cms_block.block_id;
with both of these queries I do get some results. But I suspect that the results are not accurate because when i try to load cms page and cms block using either page_id or block_id with same id. the pages that comes up are totally not related.
Example:
http://domain/index.php/admin/cms_page/edit/page_id/7/
loads unrelated data compared with that following block;
http://domain/index.php/admin/cms_block/edit/block_id/7/