Raised This Month: $ Target: $400
 0% 

dbi_num_rows help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nhdriver4
Senior Member
Join Date: Nov 2005
Old 04-27-2006 , 18:15   dbi_num_rows help
Reply With Quote #1

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
__________________
nhdriver4 is offline
Send a message via AIM to nhdriver4
Des12
Senior Member
Join Date: Jan 2005
Old 04-27-2006 , 19:20  
Reply With Quote #2

Shouldn't you use %i to print out numbers?
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
nhdriver4
Senior Member
Join Date: Nov 2005
Old 04-27-2006 , 19:23  
Reply With Quote #3

Thanks Des12. +Rep for you.
__________________
nhdriver4 is offline
Send a message via AIM to nhdriver4
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode