Raised This Month: $ Target: $400
 0% 

MySQL Queries


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mlk27
Veteran Member
Join Date: May 2008
Old 07-27-2009 , 08:05   MySQL Queries
Reply With Quote #1

When executing multiple queries using SQL_QueryAndIgnore, do I need to exec each of them in separate handle? Or this is already fine?

Code:
new iError, szError[256] new Handle:hSQLConnection = SQL_Connect(g_hSQLTuple, iError, szError, charsmax(szError)) if(hSQLConnection != Empty_Handle) {     SQL_QueryAndIgnore(hSQLConnection,         "CREATE TABLE IF NOT EXISTS rm_servers (\             serverip VARCHAR(32) NOT NULL PRIMARY KEY, \             servername VARCHAR(64) NOT NULL) \         ENGINE=MyISAM DEFAULT CHARSET=utf8;"         )     SQL_QueryAndIgnore(hSQLConnection,         "INSERT INTO rm_servers SET serverip='%s', \         servername='%s' ON DUPLICATE KEY UPDATE servername='%s'", g_ServerIp, g_ServerName, g_ServerName)     SQL_FreeHandle(hSQLConnection) } else {     log_amx("config_init(): SQL Error #%d - %s", iError, szError)     set_fail_state(szError) }
Mlk27 is offline
 


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 18:19.


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