Created
January 22, 2016 16:58
-
-
Save code-poel/e3a43cc2eabfe3364ff9 to your computer and use it in GitHub Desktop.
Check if an Mview index is up-to-date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Check if an Mview index is up-to-date | |
$connection = Mage::getSingleton('core/resource')->getConnection('core_read'); | |
$sub = $connection->select()->from(['cl' => $table], ['version_id'])->order('version_id DESC')->limit(1); | |
$select = $connection->select() | |
->from(['m' => 'enterprise_mview_metadata'], ['version_id', 'latest_id' => $sub, 'status']) | |
->where('changelog_name = ?', $table) | |
->limit(1); | |
$status = $connection->fetchRow($select); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment