This file contains 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 | |
$productCollection->getSelect()->join( | |
new Zend_Db_Expr("(SELECT product_id, SUM(impressions) as impressions, SUM(clicks) as clicks, SUM(cart) as cart, SUM(conversions) as conversions, round(SUM(profit), 2) as profit, round(SUM(profit)/SUM(impressions), 3) as rpi | |
FROM evermart_crosssells_statistics_daily" . | |
($dateFilter ? " WHERE $dateFilter" : "") | |
. " GROUP BY product_id)"), | |
't.product_id = e.entity_id', | |
array('t.impressions','t.clicks', 't.cart', 't.conversions', 't.profit', 't.rpi') | |
); |
This file contains 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
ALTER TABLE `table_name` | |
ADD `updated_at` datetime NULL DEFAULT now() on update now(); |
This file contains 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
#For single file: | |
git rm --cached mylogfile.log | |
#For single directory: | |
git rm --cached -r mydirectory | |
# Now you have to put the file/directory into .gitignore |
This file contains 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
# Install a pip package in the current Jupyter kernel | |
import sys | |
!{sys.executable} -m pip install numpy |