Error with search option

QuestionsError with search option
David Ramirez asked 2 months ago

Good day, first of all, congratulation for your work.

My grid is working with the next SQL query:

$g->select_command = “SELECT
s.idSolicitud,
s.Generado_el,
s.Nombre_Pax,
s.Nro_Pax,
s.Fecha_Viaje,
c.Nombre_Cliente,
ac.Nom_Agt_Cliente,
a.nombre AS Recibido_por,
a1.nombre AS Delegado_a,
s.Recibido_el,
e.Estado AS idEstado,
s.Notas_estado,
s.Fecha_cambio,
s.Notas,
s.Nro_File
FROM
solicitudes s JOIN agentes a ON s.Recibido_por=a.idAgente
LEFT JOIN agentes a1 ON s.Delegado_a=a1.idAgente
JOIN clientes c ON s.idCliente=c.idCliente
JOIN agente_cliente ac ON ac.idAgt_Cliente=s.idAgt_Cliente
JOIN estados e ON e.idEstado=s.idEstado”;

But I have the next error message: “Couldn’t execute query. Column ‘idEstado’ in where clause is ambiguous

¿How can I solve this error? or ¿is possible enable search in only one column?.

Thanks

David

2 Answers
C3media answered 2 months ago

Hello, refer: https://www.phpgrid.org/docs/column-options/#db-tablefield-name

Try changing the col name then other column with same name in grid.

Regards!

Abu Ghufran Staff answered 1 month ago

Hi,

You need to specify table.field in dbname property of that column.

http://www.phpgrid.org/docs/selecting-columns/

http://www.phpgrid.org/docs/column-options/#db-tablefield-name

_________________________
Abu Ghufran - Dev Team
PHP Grid Framework
 
Your Answer

9 + 1 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!