Tag: sql

Magento: how to create a super fast catalog export for Google Merchant

So you need a script to export your catalog products into a CSV file to import it on Google Merchant. There is a lot of scripts on the net to do this, but the problem with these scripts is, as usual, speed performance. If you have a big/huge catalog you will experience issue on speed, […]

MySQL: display records per hours, days, etc…

Un’ottimo metodo per calcolare i record totali raggruppati per periodi di tempo (avendo a disposizione una colonna di tipo timestamp): SELECT COUNT(id) as items FROM <tablename> WHERE timestamp BETWEEN <date_from> AND <date_to> GROUP BY DATE_FORMAT(FROM_UNIXTIME(timestamp), ‘%H’) In questo modo se per esempio <date_from> e <date_to> formano 24 ore, otterremo i record raggruppati per ogni ora […]