Raised This Month: $51 Target: $400
 12% 

native dbi_num_rows


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mulan
Senior Member
Join Date: Jul 2005
Location: [GER]Worbis
Old 08-16-2006 , 11:33   native dbi_num_rows
Reply With Quote #1

Hi I become this entry in my log:

PHP Code:
L 08/16/2006 17:23:09: [AMXXDisplaying debug trace (plugin "meter.amxx")
L 08/16/2006 17:23:09: [AMXXRun time error 10native error (native "dbi_num_rows")
L 08/16/2006 17:23:09: [AMXX]    [0meter.sma::client_authorized (line 122
this is the section:

PHP Code:
public client_authorized(id){
    
first[id] = true
    
new authid[32]
    
get_user_authid(id,authid,31)    
        
#if defined USING_SQL
            
result dbi_query(dbc,"SELECT * FROM travelmeter WHERE steamid = '%s'",authid)
(
122)        if (dbi_num_rows(result) < 1) { 
                
meter[id] = 0
            
}else{ //get meters from database
                
dbi_nextrow(result)
                
meter[id] = dbi_result(result,"meter")
            }
        
#endif    

Please help me... Im using AMXX 1.71
__________________
Mulan is offline
Send a message via ICQ to Mulan
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 08-16-2006 , 12:38   Re: native dbi_num_rows
Reply With Quote #2

before you check to see if there are number of rows you must first see if its a valid result

PHP Code:
if(result <= RESULT_FAILED)
    return; 
and then your code.

I guess you were porting from AMX?
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
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 17:07.


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