Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted January 23, 20222 yr 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, 20222 yr by opentype
January 23, 20222 yr Solution $recordClass::getItemsWithPermission( [ [ "`cms_custom_database_{$record::$customDatabaseId}`.`category_id`=?",$record->container()->id ] ], ... ) This should work