Created
July 30, 2016 23:04
-
-
Save Bat-Chat/c6a582584c558d6339a793c7aa81822b to your computer and use it in GitHub Desktop.
запись в базу нативным sql-ом
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
запись в базу нативным sql-ом | |
$writeConnection = Mage::getSingleton('core/resource')->getConnection('core_write'); | |
$table = $resource->getTableName('catalog/product'); | |
$currentTime = date('Y-m-d H:i:s', time()); | |
$query = "UPDATE {$table} SET column = column + 1 WHERE updated_at = {$currentTime}"; | |
$writeConnection->query($query); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment