static protected function doctrineQuery($tableName, $field, $generate)
    {
        return \Doctrine_Query::create()
                              ->select($field)
                              ->from($tableName)->where("$field = ?", $generate)
                              ->execute(array(), \Doctrine_Core::HYDRATE_SINGLE_SCALAR);
    }