Tag Archives: mysql tricks

MySQL Group Concatenation – The hidden function

mysql group concat

The MySQL GROUP_CONCAT function isn't a well-known feature, but it is one of the most useful functions that exists in MySQL. I call it the "loop-killer". Here are a few ways to put it to use on your site. more …

MySQL – Query last months data

You can query last months data without involving your scripting language to manipulate dates. Using MySQL's built in date subtraction methods, this is made simple with a WHERE clause. where month(ts_created) = month(now() - interval 1 month)   and year(ts_created) … more …

MySQL Bulk Update with ColdFusion

The example below demonstrates the use of the MySQL CASE statement to cleverly construct a bulk update statement. A huge performance boost over performing individual update statements, especially if you have a large number of them to execute. <cfquery>     … more …