newbie LAC Posted June 29, 2019 Posted June 29, 2019 Hello, \IPS\Content\Item::getItemsWithPermission() You don't allow to add columns to tables I've added new table and I want to order topics by column from new table. But I can't $subSelectClause = static::$databaseTable . '.' . static::$databasePrefix . static::$databaseColumnId; /* Are we doing a pseudo-rand ordering? */ if( $order == '_rand' ) { $subSelectClause .= ', SUBSTR( ' . static::$databaseTable . '.' . static::$databasePrefix . static::$databaseColumnMap['date'] . ', ' . rand( 1, 9 ) . ', 10 ) as _rand'; } $select = \IPS\Db::i()->select( $subSelectClause, static::$databaseTable, $where, $order, $limit, ( $joinComments ? static::$databasePrefix . static::$databaseColumnId : NULL ), NULL, $queryFlags ); Could you add data (columns | expressions) from $order to $subSelectClause?
bfarber Posted July 8, 2019 Posted July 8, 2019 I've raised your request internally for consideration.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.