Raised This Month: $ Target: $400
 0% 

Mysql query check


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
faki
Senior Member
Join Date: Jul 2013
Old 11-02-2013 , 07:28   Mysql query check
Reply With Quote #1

I need to check is there a info for this in db:
Code:
SQL_PrepareQuery(sql,"SELECT address FROM `amx_serverinfo` WHERE address ='%s:%s'", szIP,szPort)
and if not, executed this query:
Code:
   SQL_QueryAndIgnore(sql, "INSERT INTO `amx_serverinfo` (timestamp,hostname,address,gametype,rcon,amxban_version,amxban_motd,motd_delay,amxban_menu, reasons,timezone_fixx) VALUES('%s','%d', '%s:%s', 'cstrike', NULL, '1.6', NULL, '10', '1', NULL, '0')", get_systime(), szHostName, szIP,szPort)
how to do that?

Last edited by faki; 11-02-2013 at 07:29.
faki 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 23:12.


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