Raised This Month: $ Target: $400
 0% 

DBI codeing problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lucky109
Senior Member
Join Date: Jan 2005
Old 04-12-2006 , 07:19  
Reply With Quote #1

Quote:
public client_putinserver(id) {

new userinfo[64]
new ipb[64]
new name[32]
get_user_name(id,name,31)
get_user_info(id,"ABC",userinfo,63)
get_user_ip(id,ipb,63)

result = dbi_query(dbc,"SELECT value FROM table");
if(result <= RESULT_FAILED)
{
new szError[76];
dbi_error(dbc , szError , 75);
server_print("[MyPlug] Error in SQL : %s" , szError);
}
else
{
new szAppend[126] , iLen;
new szValue[36];
while(dbi_nextrow(result))
{
dbi_result(result , "value" , szValue , 35);
iLen += format(szAppend[iLen] , 125 - iLen , "%s" , szValue);
}
if(equal(userinfo,"%s"))
{
}
else {
server_cmd("kick #%d ^"%L^"",get_user_userid(id),LANG_SERVER,"kick _reason")
}
dbi_free_result(result)
}
}
Error in SQL : You have an errorin your SQL syntax; check the manual that corresoonds to

i'm a noob><
why why why tell me why><
lucky109 is offline
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 16:40.


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