Doing calculations in MySQL vs PHP
Context: We have a PHP/MySQL application. Some portions of the calculations are done in SQL directly. eg: All users created in the last 24 hours would be returned via an SQL query ( NOW() – 1 day) There's a debate going on between a fellow developer and me where I'm having the opinion that we should: A. Keep all calculations / code / logic in PHP and treat MySQL as a 'dumb' repository of information His opinion: B. Do a mix and match depending on whats easier / faster. http://www.onextrapixel.com/2010/06/23/mysql-has-functions-part-5-php-vs-mysql-performance/ I'm looking at maintainability