Код:
<?php $db_host = '127.0.0.1'; $db_user = 'логин'; $db_pass = 'пароль'; $msconnect=mssql_connect("$db_host","$db_user","$db_pass"); function unban() { $sql = "DELETE FROM rf_user.dbo.tbl_UserBan WHERE nPeriod = 24"; $res = mssql_query ($sql); if ($res) $text.="Баны сняты"; else $text.= "Ошибка!"; return $text; } echo unban();