Raised This Month: $ Target: $400
 0% 

DBI Query Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nhdriver4
Senior Member
Join Date: Nov 2005
Old 04-08-2006 , 05:47   DBI Query Help
Reply With Quote #1

I was working with someone in the forums on using the correct syntax in my plugin, so that it's compatable with various database types.

This is the origional line that I used:
Code:
format(query, 350, "REPLACE INTO %s VALUES ( '%s','%s', '1' )", sql_table, authid, tag)

This is the line that I was told I should use. However, it doesn't update the database, or throw any error.
Code:
format(query, 350, "UPDATE %s SET steamid='%s', tag='%s', toggle='1'", sql_table, authid, tag)

Comments, or suggestions please?
__________________
nhdriver4 is offline
Send a message via AIM to nhdriver4
Sandurr
Senior Member
Join Date: Aug 2005
Old 04-08-2006 , 06:35  
Reply With Quote #2

Code:
format(query, 350, "UPDATE %s SET tag='%s', toggle='1' WHERE steamid='%s'", sql_table, authid, tag,authid)
Sandurr is offline
nhdriver4
Senior Member
Join Date: Nov 2005
Old 04-08-2006 , 06:42  
Reply With Quote #3

Thanks, worked like a charm. Unfortunatly, I can only test on mysql. So, I'll have to wait for feedback from other users, if there are any.

Thanks again.
__________________
nhdriver4 is offline
Send a message via AIM to nhdriver4
Sandurr
Senior Member
Join Date: Aug 2005
Old 04-08-2006 , 08:16  
Reply With Quote #4

Code:
format(query, 350, "UPDATE %s SET tag='%s', toggle='1' WHERE steamid='%s'", sql_table, tag,authid)

this ones fixed, I forgot to remove the first authid

anyways np
Sandurr is offline
nhdriver4
Senior Member
Join Date: Nov 2005
Old 04-08-2006 , 09:25  
Reply With Quote #5

Quote:
Originally Posted by Sandurr
this ones fixed, I forgot to remove the first authid
anyways np
Yea I cought that. Thanks.
__________________
nhdriver4 is offline
Send a message via AIM to nhdriver4
Reply


Thread Tools
Display Modes

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:43.


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