opentype Posted January 23, 2022 Posted January 23, 2022 (edited) This code … $recordClass::getItemsWithPermission( array(array('category_id=?',$record->container()->id), … Results in “Column 'category_id' in where clause is ambiguous” in developer mode. How can I make the call unambiguous? I haven’t found anything about using aliases in such a call with getItemsWithPermission and prepared statements. (Manually adding the column name works of course, but I am not sure that’s the cleanest and recommended solution.) Edited January 23, 2022 by opentype
Solution Martin A. Posted January 23, 2022 Solution Posted January 23, 2022 $recordClass::getItemsWithPermission( [ [ "`cms_custom_database_{$record::$customDatabaseId}`.`category_id`=?",$record->container()->id ] ], ... ) This should work opentype 1
Recommended Posts