MySQL DML in PHP. For fun.
$select = Select::fields('count(*)');
$select->from('users');
$select = Select::fields('name');
$select->from('users');
$select->orderBy('length(name) DESC');
$select->limit(10);
$select->page(12);
$select = Select::fields('name');
$select->from('users');
$select->orderBy('length(name) DESC');
$select->limit(10);
$select->page(12);
$select = Select::fields('foo, bar');
$select = Select::fields(['foo, bar']);
$select = Select::fields('foo', 'bar');
$select = Select::fields(['foo', 'bar']);
$select = Select::fields('name');
$select->from('users AS u');
$select->join('posts AS p ON p.created_by = u.user_id');
$select->leftJoin('comments AS c ON c.post_id = p.post_id');
print $select->getJoin('p');
print $select->getJoin('c');
print $select->getSQL();