SAPE ERROR: Не могу подключиться к серверу: dispenser-01.saperu.net/code.php?user=836f97673aa6aa25a35b5029263ee232&host=amxxmodx.ru&charset=windows-1251&format=serialize, type: file_get_contents

SAPE ERROR: Не могу подключиться к серверу: dispenser-02.saperu.net/code.php?user=836f97673aa6aa25a35b5029263ee232&host=amxxmodx.ru&charset=windows-1251&format=serialize, type: file_get_contents

SQL_MoreResults » AmxModX
| |
 RSS
  • OnLine

    : 6
    : 5
    : -
    : crawl Bot

    ?

    • AMX Mod X
    • up.org.ua


  • : Admin : 26-11-2011, 00:17 : 3099

    SQL_MoreResults

    SQL_MoreResults .
    1 1, 0 - 0.
    , ( ) .
    , .

    SQLx.inc:
    /**
    * Returns 1 if there are more results to be read,
    *  0 otherwise.
    */
    native SQL_MoreResults(Handle:query);


    :
    SQL_MoreResults ( Handle:query )

    • Handle:query - . ( , ))


    :
    Native

    :

    /* Plugin generated by AMXX-Studio */

    #include <amxmodx>
    #include <amxmisc>
    #include <sqlx>

    #define PLUGIN "[SQLx.inc] SQL_MoreResults"
    #define VERSION "1.0"
    #define AUTHOR "Admin"

    new Handle:SQL_Tuple
    new Handle:SQL_Connection

    public plugin_init() {
        
        register_plugin(PLUGIN, VERSION, AUTHOR)
        register_cvar("SQLx_host","localhost")
        register_cvar("SQLx_db","amxxmodx")
        register_cvar("SQLx_user","admin")
        register_cvar("SQLx_password","pass")
        
        register_concmd("select_sql","sqlx_select")
    }
    public plugin_cfg(){
        new host[33],dbase[33],user[33],pass[33]
        get_cvar_string("SQLx_host",host,30)
        get_cvar_string("SQLx_db",dbase,30)
        get_cvar_string("SQLx_user",user,30)
        get_cvar_string("SQLx_password",pass,30)
        SQL_Tuple = SQL_MakeDbTuple(host,user,pass,dbase) //
        new err, error[256]
        SQL_Connection = SQL_Connect(SQL_Tuple, err, error, charsmax(error)) //
        
        if(SQL_Connection != Empty_Handle)
        {
            log_amx("[SQLx connect ok]") //
            }else{
            log_amx("[SQLX sql error] %s ",error) // ()
            pause("a")
        }
        
    }
    public sqlx_select(id){
        
        //
        new Handle:query = SQL_PrepareQuery(SQL_Connection,"SELECT * FROM `test_table`")
        //
        SQL_Execute (query)
        
        
        new sql_result = SQL_MoreResults(query)
        server_print("Result status: %s",sql_result? "Ok" : "No result")
    }
    public plugin_end(){

        SQL_FreeHandle(SQL_Connection)

    }


    :
    , ( ) SQLx .

    , SQL_MoreResults, .
    , , SQL_MoreResults.

    , , .

    select_sql .
    :
    public sqlx_select(id){
        
        //
        new Handle:query = SQL_PrepareQuery(SQL_Connection,"SELECT * FROM `test_table`")
        //
        SQL_Execute (query)
        
        
        new sql_result = SQL_MoreResults(query)
        server_print("Result status: %s",sql_result? "Ok" : "No result")
    }


    , 2 :
        new sql_result = SQL_MoreResults(query)
        server_print("Result status: %s",sql_result? "Ok" : "No result")

    , , .

    , .
    , .
    .
    , .
    .
    SQL_MoreResults