viewing paste Unknown #11889 | SQL

Posted on the
1 2 3 4 5 6 7 8 9
        // Build PK Rank ranking list [Zephyrus]
        IF( SQL_ERROR == Sql_Query(sql_handle, "SELECT `char_pk`.`char_id`, `char_pk`.`score`, `%s`.`name` FROM `char_pk` LEFT JOIN `%s` ON     `%s`.`char_id` = `char_pk`.`char_id` WHERE `char_pk`.`score` > '0' ORDER BY `char_pk`.`score` DESC LIMIT 0,%d", char_db, char_db, char_db, fame_list_size_pvprank) )
                Sql_ShowDebug(sql_handle);
        FOR( i = 0; i < fame_list_size_pvprank && SQL_SUCCESS == Sql_NextRow(sql_handle); ++i )
        {
                Sql_GetData(sql_handle, 0, &DATA, NULL); pvprank_fame_list[i].id = atoi(DATA);
                Sql_GetData(sql_handle, 1, &DATA, &len); pvprank_fame_list[i].fame = atoi(DATA);
                Sql_GetData(sql_handle, 2, &DATA, &len); memcpy(pvprank_fame_list[i].name, DATA, MIN(len, NAME_LENGTH));
        }
Viewed 307 times, submitted by unknown.