statement closed (mysql, HELP)

Discussion in 'Plugin Development' started by SzymonOwca, Oct 1, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    SzymonOwca

    Hi,

    I have problem with database connection.
    My commands not work (I don't know why ;c This plugin is one of the few which i create with using mysql connection)
    And message in console :

    Code:
    Communications link failure
    
    and
    Code:
    No operations allowed after statement closed.
    This is my code:
    http://pastebin.com/9YmjmUrZ
     
  2. Online

    timtower Administrator Administrator Moderator

    SzymonOwca Could you provide the entire stack trace?
     
  3. Offline

    SzymonOwca

    The plugin its work and commands OK but after some time in console display this:

    Communications link failure

    The last packet successfully received from the server was 250,415 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.

    And when I use command after text in console, the command not work and display this:
    No operations allowed after statement closed.

    Reload fix this but this is repeated again...
     
  4. Offline

    1Rogue

    You should make a generic MySQL class with functions for queries, opening, and closing, then have a class that handles data management. You don't want to have a connection open over a length of time, just open it when needed and close it after.
     
    werter318 likes this.
Thread Status:
Not open for further replies.

Share This Page