Febrero de 2007 09:49 p.m.
Para: Cake PHP
Asunto: Re: Ambiguous columns in findAll()
The $conditions = array('Candidato.nome' = LIKE %{$search_term}%);
worked as a champ. And this even helped me to better understand the
innards of the FindAll method.
Nate, I was not able to fully understand how
: Ambiguous columns in findAll()
Better yet:
$this-postConditions($this-data, array('nome' = 'LIKE'), null,
true);
which will give you the same result.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group
I implent search fields using examples I found here in the group:
function search() {
if(empty($this-data)) {
$this-render();
} else {
$conditions =array();
$search_term = $this-data['Candidato']['nome'];
$conditions['Candidato']['nome'] = LIKE
I implent search fields using examples I found here in the group:
function search() {
if(empty($this-data)) {
$this-render();
} else {
$conditions =array();
$search_term = $this-data['Candidato']['nome'];
$conditions['Candidato']['nome'] = LIKE
Hi Norman
The way I normally format my conditions array is for example:
$conditions = array('Batch.id' = $id);
When the query runs Cake reformats 'Table.column' as `Table`.`column`.
This result is no ambiguity.
I have not constructed a LIKE condition, so I don't know about the right
hand
, be cool, and share your knowledge.
BAKE ON!
blog: http://www.MarianoIglesias.com.ar
-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Norman
Enviado el: Lunes, 26 de Febrero de 2007 07:28 p.m.
Para: Cake PHP
Asunto: Ambiguous columns in findAll
-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Norman
Enviado el: Lunes, 26 de Febrero de 2007 07:28 p.m.
Para: Cake PHP
Asunto: Ambiguous columns in findAll()
The problem is, when the model have any relation with another table/
model which contains an ambiguous field
el: Lunes, 26 de Febrero de 2007 07:28 p.m.
Para: Cake PHP
Asunto: Ambiguous columns in findAll()
The problem is, when the model have any relation with another table/
model which contains an ambiguous field name, this method fails with
SQL errors: SQL Error in model Candidato: 1052