Chris Nizzardini, Salt Lake City Utah, Web Developer Specializing in LAMP+Ajax Since 2006

My Blog

Here is my awesome blog.

Archive for June, 2009

zend studio 6 fails – going back to zend 5.5

Posted by chris on June 6th, 2009 Comments (3)

Zend, the PHP Company, took a major step back with their PHP IDE when they moved it too the eclipse platform. I’m not a fan of eclipse, I don’t even like using it for Java development – which its built for. Zend Studio 6 is slow, clunky, the user interface is confusing, the FTP component is horrible.

If you can name it, Zend 5.5 beats Zend 6 at it, except for javascript support. However, I only need a JavaScript IDE for when I am doing heavy JavaScript coding or debugging. The worst part about Zend Studio 6 is the FTP component. Every time you save a file – it refreshes the folders and closes them all. So you can to open the folder again and wait everytime you make a save! Finally I decided to update the program hoping they had fixed this bug. When I updated to the latest version I was no longer able to connect to most of the FTP servers I had (roughly 10), one of which was to this domain.

At the point I uninstalled and went back to Zend 5.5 and wrote this article. Flat out, Zend Studio 6 sucks.

In rant ()

mysql with rollup for a easy grouped total columns in result set

Posted by chris on June 4th, 2009 Comments(0)

Using the WITH ROLLUP modifier in queries using GROUP BY will add an additional row to the result set which sums all columns. This prevents you from having you to write code which adds each column in your programming language.

Description from the Mysql Reference Manual

The GROUP BY clause allows a WITH ROLLUP modifier that causes extra rows to be added to the summary output. These rows represent higher-level (or super-aggregate) summary operations. ROLLUP thus allows you to answer questions at multiple levels of analysis with a single query. It can be used, for example, to provide support for OLAP (Online Analytical Processing) operations.

Example

1
2
3
4
5
6
7
8
SELECT 
	DATE(dateTime) AS order_date, count(*) AS shipments, sum(shipping_total) AS shipping_total, sum(hasShipAmt) AS hasShipAmt, sum(shipping_total)-sum(hasShipAmt) AS revenue  
FROM 
	tbl_my_orders 
WHERE 
	dateTime BETWEEN '$startDate' AND '$endDate 23:59:59' 
GROUP BY 
	order_date WITH ROLLUP
In SQL (, , , )