viewing paste Unknown #18908 | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12
        int autotrade = SQL->Query(inter->sql_handle, "SELECT `autotrade` FROM `char` WHERE `char_id`='%d' LIMIT 1", char_id);
 
        //Update DB
        //if( SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `online`='1' WHERE `char_id`='%d' LIMIT 1", char_db, char_id) )
        //      Sql_ShowDebug(inter->sql_handle);
       
        if(autotrade)
                if( SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `online`='2' LIMIT 1", char_db) )
                        Sql_ShowDebug(inter->sql_handle);
        else if(!autotrade)
                if( SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `online`='1' WHERE `char_id`='%d' LIMIT 1", char_db, char_id) )
                        Sql_ShowDebug(inter->sql_handle);
Viewed 344 times, submitted by unknown.