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
1 Answers
To avoid ambiguity, you need to set table.field in dbname property: e.g.
$col[“dbname”] = “products.id”;
Your Answer
Resolved, regards!