<?php
/**
 * This class has been auto-generated by the Doctrine ORM Framework
 */
class ThdFilmTable extends Doctrine_Table
{

    public function findByScoredId($ids)
    {
      $query = $this->createQuery('p');
      $query->select('p.*')
            ->whereIn('p.uniqueid', $ids)
            // Keep scoring
            // http://groups.google.com/group/symfony-users/browse_thread/thread/92adb0332dfe1065/ee7b8c0d27208368?lnk=gst&q=zend+search+sort#ee7b8c0d27208368
            ->addSelect('FIELD(p.uniqueid,\''.implode('\', \'', $ids).'\') AS field')
            ->orderBy('field');

      return $query->execute();
    }
	
}