$query = Doctrine_Query::create() ->select('u.*') ->from('User u') ->execute();
$query = Doctrine_Query::create() ->from('User u') ->limit(10) ->offset(20) ->orderBy('u.username ASC') ->execute();
$query = Doctrine_Query::create() ->from('User u') ->leftJoin('u.Address a') ->where('u.username = ?', 'johndoe') ->andWhere('a.city = ?', 'New York') ->execute();This code creates a query to select users from the "User" table where the username is equal to "johndoe" and their address city is "New York". It also performs a left join on the user's address table. Overall, Doctrine_Query is a powerful tool for querying and manipulating databases in PHP using object-oriented concepts. Its versatility and ease-of-use make it a popular package library for PHP developers.