joomla/joomla-platform — pull request #1604 by okonomiyaki3000 (2012-10-15 09:01:41+00:00)
Title: New function: JDatabaseQuery:format() 

A sprintf-like function for building queries or query fragments.

Usage:
```php
$query->format('SELECT %1$n FROM %2$n WHERE %3$n = %4$a', 'foo', '#__foo', 'bar', 1);
```
Returns:
```php
'SELECT `foo` FROM `#__foo` WHERE `bar` = 1'
```