'id' in where clause is ambiguous

365 Views Asked by At

I have a table with some fields and some relations with others.

I get the list view with no problem, but when I try to filter the results (using the search feature in flexigrid table) I get:

A Database Error Occurred

Error Number: 1052

Column 'id' in where clause is ambiguous

SELECT gee_job_boards.*, j32e2cb0f.dp_name AS s32e2cb0f FROM gee_job_boards LEFT JOIN gee_distribution_partner as j32e2cb0f ON j32e2cb0f.id = gee_job_boards.dp_id WHERE id LIKE '%27%' ESCAPE '!' LIMIT 25

Filename: models/Grocery_crud_model.php

Line Number: 87

Error Number: 1052

Column 'id' in where clause is ambiguous

how could i solve this ?

thanks

1

There are 1 best solutions below

2
Antoine Marques On

You should qualify your id in where clause, for example like this

j32e2cb0f.id LIKE ...