FridgeMagnet
Administrator
Quite often it is easier and more efficient - and, crucially, more readable and modifiable - to throw logic around in PHP rather than trying to make some massive fancy SQL query. Doing everything in SQL is like doing everything in a regex IMO, sometimes it is possible but as complexity rises it stops being the best way very quickly.I found SQL to be fairly straightforward. Admittedly I often did some stuff in php that might have been more efficiently done as a more directed SQL statement.
In my last job, heavy queries actually caused the most site failures; PHP itself is pretty robust and fast, particularly 7.
