Problem assigning multiple categories to azlist.
Hi,
I'm experiencing an Error Number: 1052 when adding a two category parameter to an azlist. My opening tag:
{exp:low_alphabet:azlist channel="staff" alpha_field="staff_lastname" numbers="after" show_empty="no" parse="inward" category="5&26"}
The error:
Error Number: 1052
Column 'entry_id' in where clause is ambiguous
SELECT 'd'.'field_id_3' AS alpha_field FROM ('exp_channel_titles' t) JOIN 'exp_channel_data' d ON 't'.'entry_id' = 'd'.'entry_id' JOIN 'exp_channels' c ON 't'.'channel_id' = 'c'.'channel_id' WHERE 't'.'site_id' IN ('1') AND 'c'.'channel_name' IN ('staff') AND 't'.'status' IN ('open') AND (t.expiration_date = '0' OR t.expiration_date > '1431972445') AND 't'.'entry_date' < '1431972445' AND 'entry_id' IN ('512', '513', '514', '515', '518', '519', '520', '521', '522', '523', '524', '525', '526', '527', '528', '529', '530', '531', '532', '533', '534', '535', '536', '537', '538', '686', '687')
Filename: third_party/low_alphabet/pi.low_alphabet.php
Line Number: 238
Please note simply putting category="26" does not pull this error. Any insight to what I'm doing wrong will be appreciated.
EE: v2.6.1 LowAlphabet: 1.1.0
Replies
Low 18 May 2015 20:30
That would be a bug. First, get the latest LA version, then open up pi.low_alphabet.php and look up line #601 which reads:
ee()->db->where_in('entry_id', $entry_ids);Replace that with this:
ee()->db->where_in('t.entry_id', $entry_ids);...and that should fix it.