In the following code snip, I can't seem to get "total" to print. I've tried many different things, with no results. Anyone have any ideas?
Code:
format(query, 350, "SELECT id, name FROM `%s` WHERE `id` = %s", table_names, pid)
new Result:result = dbi_query(sql, "%s", query)
new total = dbi_num_rows(result)
if (result >= RESULT_OK) {
new names[33]
client_print(id, print_console, " ")
client_print(id, print_console, "[IDTRACKER] You ran a search on %s", authid)
client_print(id, print_console, "[IDTRACKER] %s's id # is %s", authid, pid)
client_print(id, print_console, "[IDTRACKER] %s has %s names associated", pid, total)
client_print(id, print_console, "==============================================")
while ( dbi_nextrow(result) > 0 ) {
dbi_result(result, "name", names, 32)
client_print(id, print_console, "%s", names)
}
client_print(id, print_console, "==============================================")
client_print(id, print_console, " ")
dbi_free_result(result)
return PLUGIN_HANDLED