title: Symfony doctrine , unique records
body: <p>I use symfony 1.4.11 with doctrine.This is one of my tables:</p>
  
  <pre><code>Subscriptions:
    connection: doctrine
    tableName: subscriptions
    columns:
      user_id: { type: integer(4), primary: true }
      category_id:  { type: integer(4), primary: true }
    relations:
      sfGuardUser: { onDelete: CASCADE, local: user_id,  foreign: id }
      Categories: { onDelete: CASCADE, local: category_id, foreign: category_id }
  </code></pre>
  
  <p>I need to get all  user_id from this table. </p>
  
  <p>I make :</p>
  
  <pre><code> public function getSubscriptionsUser()
    {
      $q = $this-&gt;createQuery('a')
          -&gt;select ('a.user_id');
  
     return $q-&gt; execute();
    }
  </code></pre>
  
  <p>But if the user is subscribed to several categories, its id will be repeated several times. Is it possible to extract only  unique id of user? If user have id = 1 , and it is repeated 10 times,in result I will have only "1" , but no "1 1 1 1 1 1 1 1 1 1" :-)
  Thank you!</p>