AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Mysql query check (https://forums.alliedmods.net/showthread.php?t=229138)

faki 11-02-2013 07:28

Mysql query check
 
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?


All times are GMT -4. The time now is 23:12.

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