The upgrade from v2 to v5 proceeded without error, as did upgrading several plugins, however when in the control panel and I select 'Edit' > and filter by a channel I get the following error:
SQLSTATE[23000]: Integrity constraint violation: 1052 Column ‘channel_id’ in where clause is ambiguous:
Code:
SELECT DISTINCT t.author_id, m.screen_name
FROM (exp_channel_titles t)
LEFT JOIN exp_members m ON m.member_id = t.author_id
WHERE channel_id = 83
ORDER BY screen_name asc
Any help identifying the cause of this error and providing a fix would be very much appreciated
Note: I understand what the error means and how to fix it, what I need to know is what is going wrong and how to fix it in relation to the framework that it's used in Expression Engine.
You have
channel_idas a column both in yourexp_channel_titlesand yourexp_membertable, and the query handler just cannot guess which one it needs to use.The solution is to either use
t.channel_idorexp_members.channel_idinstead of justchannel_id, so your query will be more specific. You will need to determine which one is the correct one.