Raised This Month: $ Target: $400
 0% 

dbi buggy?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kexz
Member
Join Date: May 2004
Old 03-17-2005 , 10:00   dbi buggy?
Reply With Quote #1

I'm running heavily modified version of admin_sql.sma... admins are not loaded into array but mysql-queried every time someone connects. Everything is running fine, except one thing...
When someone connects with nick like "punk'o'matic" I get error:
Code:
L 03/17/2005 - 14:34:04: [AMXX] Native error in "dbi_query" on line 141 (plugin "admin.amxx").
L 03/17/2005 - 14:34:04: [MYSQL] Invalid database handle -1
L 03/17/2005 - 14:34:04: [AMXX] Debug Trace =>
L 03/17/2005 - 14:34:04: [AMXX]       [0] Line 141, File "admin.sma"
L 03/17/2005 - 14:34:04: [AMXX]       [1] Line 208, File "admin.sma"
L 03/17/2005 - 14:34:04: [AMXX]       [2] Line 250, File "admin.sma"
L 03/17/2005 - 14:34:04: [AMXX] Native error in "dbi_num_rows" on line 156 (file "admin.sma").
L 03/17/2005 - 14:34:04: [MYSQL] Invalid result handle -6
L 03/17/2005 - 14:34:04: [AMXX] Native error in "dbi_free_result" on line 194 (file "admin.sma").
L 03/17/2005 - 14:34:04: [MYSQL] Invalid result handle -6
L 03/17/2005 - 14:34:04: [AMXX] Native error in "dbi_close" on line 195 (file "admin.sma").
L 03/17/2005 - 14:34:04: [MYSQL] Invalid database handle -1
The weird thing is that it does work, if someone connects with nick "I'm gay" or something (one quote only)...
I used to escape single quote characters, but then I realised that you cannot use double quotes in your nick, so I changed my query and now it looks like this:
Code:
format(query, 511, "SELECT `flags`,`access`,`password` FROM `admins` WHERE `name`=^"%s^"", name)
new Result:Res = dbi_query(sql, query)
It doesn't matter if I escape quotes with \ or not, it still doesn't work... but it works if I execute this query in mysql console screen

So, I guess this is some dbi bug or I'm doing something wrong?
kexz is offline
 



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 13:57.


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