Forum

Results 1 to 11 of 11
  1. #1
    Join Date
    October 2016
    Posts
    52

    Get list of channels between 2 channels

    Hello, im working on script which gaves me a list of channels between 2 channels.

    Example

    Channel hierarchy:

    channel1
    channel2
    --section1--
    aaa
    bbb
    ccc

    --section2--
    channel3...

    And I WANT to get channels between --section1-- and --section2-- so:

    aaa
    bbb
    ccc


    BUT im getting channels out of range --section1-- and --section2--


    My code looks like:

    Code:
    $stmt = qq(
        	SELECT id
            FROM channel_properties
            WHERE
        		channel_properties.id in (
        			select channels.channel_id from channels where channel_parent_id = 0 AND channels.channel_id = channel_properties.id
        		)
                AND ident = 'channel_order'
        		AND server_id = 1
        		AND value BETWEEN ? AND ?;
            LIMIT 1000);
        $sth = $dbh->prepare($stmt);
        $sth->bind_param(1, $start_order + 1);
        $sth->bind_param(2, $end_order - 1);
    $start_order is order of channel --section1-- and $end_order is order of channel --section2--

    Any help? Please

  2. #2
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,342
    Why on earth are you even using SQL?

  3. #3
    Join Date
    October 2016
    Posts
    52
    Quote Originally Posted by numma_cway View Post
    Why on earth are you even using SQL?
    And? How can i get data from TeamSpeak database? if it uses sqllite?

  4. #4
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,342
    You don't. You use query. In that case, all channels are already in the order you need.

  5. #5
    Join Date
    October 2016
    Posts
    52
    Quote Originally Posted by numma_cway View Post
    You don't. You use query. In that case, all channels are already in the order you need.
    How can i use server query to get informations about my channels in Perl?

  6. #6
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,342
    Use TCP. But this is not a Perl forum.

  7. #7
    Join Date
    October 2016
    Posts
    52
    Quote Originally Posted by numma_cway View Post
    Use TCP. But this is not a Perl forum.
    sorry but i dont know how to get information about channels using TCP.. I know that this is not Perl forum and im not asking for Perl script... im asking how to get that information, for example using sql

  8. #8
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,342
    There is no other way than TCP query. If you cannot do that, bad luck.

  9. #9
    Join Date
    October 2016
    Posts
    52
    Quote Originally Posted by numma_cway View Post
    There is no other way than TCP query. If you cannot do that, bad luck.
    and can you give me a any example of TCP query to teamspeak? Thanks

  10. #10
    Join Date
    September 2012
    Posts
    6,076
    you connect to the query interface of the TeamSpeak 3 server and issue relevant commands there.
    See serverquerydocs/ folder included in the TeamSpeak 3 server download.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  11. #11
    Join Date
    June 2008
    Posts
    18,028
    We also have a step by step thread for this.
    click me to get an "how to use the Query Interface with Putty"
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Not possible] How to resize the window with a list of channels?
    By Deireadh in forum Skins / Icon & Sound Packs
    Replies: 1
    Last Post: January 11th, 2016, 08:29 AM
  2. about list of channels members
    By ss.xx in forum General Questions
    Replies: 1
    Last Post: June 17th, 2011, 09:54 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •