hello
i want to sort channels by points , sorting is ok in website but when i try to modify channels order i can't
i tried more than one method and all failed
my code
sry for my bad english
i want to sort channels by points , sorting is ok in website but when i try to modify channels order i can't
i tried more than one method and all failed
my code
PHP:
$sql = $mysqlcon->query("SELECT * FROM $dbname.RoomsPoints ORDER BY points DESC");
$ChannelsArray = $sql->fetchAll();
foreach ( $ChannelsArray as $ke=>$channel ){
echo $ts3_VirtualServer->channelGetById($channel['cid'])['channel_name'].'<br>';
$change = array("channel_order" => $ts3_VirtualServer->channelGetById($channel['cid'])['channel_order'] );
$ts3_VirtualServer->channelGetById($channel['cid'])->modify($change);
}
sry for my bad english