Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted June 29, 20195 yr 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?
Archived
This topic is now archived and is closed to further replies.