Problem with multiselect filter

QuestionsProblem with multiselect filter
c3media asked 6 years ago

Hello Abu,

 

Have two tables:

Products and Categories

Both has id field, so Products table have a field names Category_id.

Then get problem because in example you have field as client_id for table client, then it has issue to work showing message:

Couldn’t execute query. Column ‘id’ in field list is ambiguous – SELECT count(*) as c FROM (SELECT id, name FROM products INNER JOIN categories on products.category_id = categories.id WHERE 1=1)

 

Thanks by your help

c3media replied 6 years ago

Resolved, regards!

1 Answers
Abu Ghufran Staff answered 6 years ago

To avoid ambiguity, you need to set table.field in dbname property: e.g.
$col[“dbname”] = “products.id”;

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

17 + 12 =

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 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

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

Let us improve this post!

Tell us how we can improve this post?