Você quer apenas 1 id? Se for, você poderia utilizar o seguinte:
$this->Section->id = $id;
$this->set('section', $this->Section->read());

Se forem vários id's, vicê pode tentar usar findAll(array("id" =>
$id));


Abraços.

On 25 out, 21:20, "Geovane Silva" <[EMAIL PROTECTED]> wrote:
> Pessoal, estou tentando realizar uma consulta
> $this->set('section',$this->Section->findall("id = $id"));
>
> E ocorre erro no resultado *SQL Error:* 1052: Column 'id' in where clause is
> ambiguous
>
> Algo errado no model?
>
> <?php
> class Section extends AppModel {
>
>     var $name = 'Section';
>     var $validate = array(
>         'nome' => VALID_NOT_EMPTY,
>         'img_titulo' => VALID_NOT_EMPTY,
>         'img_vertical_bar' => VALID_NOT_EMPTY,
>         'img_horizontal_bar' => VALID_NOT_EMPTY,
>         'publicado' => VALID_NOT_EMPTY,
>     );
>
>     //The Associations below have been created with all possible keys, those
> that are not needed can be removed
>     var $belongsTo = array(
>             'Categoria' =>
>                 array('className' => 'Categoria',
>                         'foreignKey' => 'categoria_id',
>                         'conditions' => '',
>                         'fields' => '',
>                         'order' => '',
>                         'counterCache' => ''
>                 ),
>
>     );
>
>     var $hasAndBelongsToMany = array(
>             'Ponto' =>
>                 array('className' => 'Ponto',
>                         'joinTable' => 'secoes_pontos',
>                         'foreignKey' => 'section_id',
>                         'associationForeignKey' => 'ponto_id',
>                         'conditions' => '',
>                         'fields' => '',
>                         'order' => '',
>                         'limit' => '',
>                         'offset' => '',
>                         'unique' => '',
>                         'finderQuery' => '',
>                         'deleteQuery' => '',
>                         'insertQuery' => ''
>                 ),
>
>     );
>
> }
>
> ?>
>
> --
> Geovane Lopes da Silva


--~--~---------~--~----~------------~-------~--~----~
Recebeu esta mensagem porque está inscrito em Grupo "Cake PHP Português" do 
Grupos Google.
 Para enviar mensagens para este grupo, envie um email para 
cake-php-pt@googlegroups.com
 Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED]
 Para mais opções, visite este grupo em 
http://groups.google.com/group/cake-php-pt?hl=pt-PT
-~----------~----~----~----~------~----~------~--~---

Responder a