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);