tags:

views:

23

answers:

1

Hi, i don't know how to translate this query :

SELECT distinct(id_ville) FROM `point_location`

I try to do it, but it doesn't work :

$c = new Criteria();
$c->add(PointLocationPeer::ID_VILLE, Criteria::DISTINCT);
$c->setDistinct();
$this->villes = PointLocationPeer::doSelect($c);
A: 

Try something like this:

$c = new Criteria();
$c->addSelectColumn(PointLocationPeer::ID_VILLE);
$c->setDistinct();
$this->villes = PointLocationPeer::doSelect($c);
kuba