joomla/joomla-platform — pull request #956 by Naouak (2012-03-03 14:09:19+00:00)
Title: Fix for omition of the glue on WHERE after the first call in query builder

As discussed on the mailing list, here is a first fix for the where of the query builder.
It should permit usage of AND and OR in a cleanier way :
$q->where("a = 1")->where("a = 2","OR")->where("b = 1","AND");

will generate :
WHERE a = 1 OR a = 2 AND b = 1

before this patch it would have generated :
WHERE a = 1 AND a = 2 AND b = 1