Raised This Month: $ Target: $400
 0% 

Mysql handle returning 0 on query problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
SaintK
Veteran Member
Join Date: Mar 2004
Old 02-27-2006 , 09:52  
Reply With Quote #7

Quote:
Originally Posted by Sandurr
you can't put clientname at the end of dbi_query()

Use format() to fix this.

Example:

Code:
new saint[256] format(saint,255,"SELECT * FROM `savednames` WHERE name = '%s'", clientname) result = dbi_query(dbc,saint) if(dbi_nextrow(result) > 0) {     // ... connection successful or no names in database }

still same error


L 02/27/2006 - 14:517: [MYSQL] Invalid database handle 0

Code:
new checkid[256] format(checkid,255,"SELECT * FROM `savednames` WHERE steamid = '%s'", usersteam) dbi_query(dbc,checkid) result = dbi_query(dbc,checkid) /*<- error code here */

seems to be anoyed at the result code for some reason
SaintK 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 20:17.


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