当前位置: 首页>>代码示例>>PHP>>正文


PHP mssql_fetch_object函数代码示例

本文整理汇总了PHP中mssql_fetch_object函数的典型用法代码示例。如果您正苦于以下问题:PHP mssql_fetch_object函数的具体用法?PHP mssql_fetch_object怎么用?PHP mssql_fetch_object使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了mssql_fetch_object函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: FindItem

 public function FindItem()
 {
     $resultQ = mssql_query("select [Name] from [Character] where (charindex (0x" . $this->ProductSerial . ", Inventory) %" . DIVISOR / 2 . "=4)");
     while ($result = mssql_fetch_object($resultQ)) {
         echo Print_error("<ul><li>Item foi encontrado no invent&aacute;rio do char: " . $result->Name . ".</li></ul>");
         $exitFunction = true;
     }
     unset($result, $resultQ);
     $findColumnsQ = mssql_query("sp_MShelpcolumns N'dbo.warehouse', null, 'id', 1");
     while ($findColumns = mssql_fetch_object($findColumnsQ)) {
         if ($findColumns->col_typename == "varbinary") {
             $resultQ = mssql_query("select [AccountId] from [warehouse] where (charindex (0x" . $this->ProductSerial . ", " . $findColumns->col_name . ") %" . DIVISOR / 2 . "=4)");
             while ($result = mssql_fetch_object($resultQ)) {
                 echo Print_error("<ul><li>Encontrado no bau do login: " . $result->AccountId . ". Tabela: warehouse, coluna: {$findColumns->name}</li></ul>");
                 $exitFunction = true;
             }
         }
     }
     unset($result, $resultQ);
     $resultQ = mssql_query("select [AccountId],[Number] from [ExtWarehouse] where (charindex (0x" . $this->ProductSerial . ", Items) %" . DIVISOR / 2 . "=4)");
     while ($result = mssql_fetch_object($resultQ)) {
         echo Print_error("<ul><li>Item foi encontrado no bau extra " . $result->Number . " do login: " . $result->AccountId . ".</li></ul>");
         $exitFunction = true;
     }
     unset($result, $resultQ);
     $resultQ = @mssql_query("select [AccountId] from [ExtWarehouseVirtual] where (charindex (0x" . $this->ProductSerial . ", Item) %" . DIVISOR / 2 . "=4)");
     while ($result = @mssql_fetch_object($resultQ)) {
         echo Print_error("<ul><li>Item foi encontrado no bau virtual do login: " . $result->AccountId . ".</li></ul>");
         $exitFunction = true;
     }
     unset($result, $resultQ);
     if ($exitFunction == false) {
         echo "<ul><li>Esse item n&atilde;o foi encontrado no servidor.</li></ul>";
     }
 }
开发者ID:neilor,项目名称:MuShopping-v3,代码行数:35,代码来源:itemfind.class.php

示例2: getInventory

 public function getInventory()
 {
     global $ldMssql;
     try {
         switch ($this->dbVersion) {
             case 1:
             case 2:
                 $this->itemSize = 10 * 76;
                 break;
             case 3:
                 $this->itemSize = 16 * $this->slotNumbers;
                 break;
         }
         /*
         $getVault = $ldMssql->query("DECLARE @BINARYITEMS VARBINARY({$this->itemSize}); SELECT @BINARYITEMS = [Inventory] FROM [".DATABASE_CHARACTERS."].[dbo].[Character] WHERE [AccountID] = '{$this->account}' AND [Name] = '{$this->character}'; PRINT @BINARYITEMS;");
         $this->binaryCode = substr(mssql_get_last_message($getVault),2);
         */
         $getVault = $ldMssql->query("USE [" . DATABASE_ACCOUNTS . "]; SELECT CONVERT(TEXT, CONVERT(VARCHAR(" . $this->itemSize . "), Inventory)) [Inventory] FROM [Character] WHERE [AccountID] = '{$this->account}' AND [Name] = '{$this->character}'; USE [" . DATABASE . "]");
         $getVault = mssql_fetch_object($getVault);
         $this->binaryCode = strtoupper(bin2hex($getVault->Items));
         if (empty($this->binaryCode)) {
             throw new Exception("Inválid inventory.");
         }
     } catch (Exception $msg) {
         exit("Inventory error: " . $msg->getMessage());
     }
 }
开发者ID:neilor,项目名称:MuSite-v2-5-x,代码行数:27,代码来源:ldInventory.class.php

示例3: fetch

 public function fetch($res)
 {
     $result = array();
     while ($data = mssql_fetch_object($res)) {
         $result[] = $data;
     }
     return $result;
 }
开发者ID:hendisantika,项目名称:ajax-crud-bootstrap,代码行数:8,代码来源:sqlsrv.php

示例4: getCustomersMultiTable

 public function getCustomersMultiTable()
 {
     $resultSet = $this->execute("select top 10 * from customers");
     $resultArr = array();
     while ($row = mssql_fetch_object($resultArr)) {
         $resultArr[] = $row;
     }
     return array($resultArr, $resultArr);
 }
开发者ID:sigmadesarrollo,项目名称:logisoft,代码行数:9,代码来源:DatabaseTestMsSql.php

示例5: checkPermission

 private function checkPermission()
 {
     $SQL_Q = $this->query("SELECT previlegy FROM dbo.webPrevilegy WHERE username='" . $_SESSION['LOGIN'] . "'");
     $SQL = mssql_fetch_object($SQL_Q);
     if ($SQL->previlegy < 1) {
         return false;
     } else {
         return true;
     }
 }
开发者ID:neilor,项目名称:MuSite-v2-5-x,代码行数:10,代码来源:ldpanelgamemaster.class.php

示例6: retrieve

 public function retrieve($patientId)
 {
     //Setup mssql connection
     $connection = $this->connectToMedboss();
     $labRequests = mssql_query("SELECT * FROM {$this->labRequestView} WHERE (PatientNumber='{$patientId}')", $connection);
     while ($patientData = mssql_fetch_object($labRequests, $connection)) {
         //save received data in staging table and to internal tables
         $this->process($patientData);
     }
 }
开发者ID:echiteri,项目名称:iBLIS,代码行数:10,代码来源:MedbossInterfacer.php

示例7: checkLogin

 /**
  * Checa se o usuário esta logado, e retorna um objecto com o numero do previlegio dele caso esteja logado.
  */
 public function checkLogin()
 {
     global $ldMssql;
     if (!isset($_SESSION['LOGIN']) && empty($_SESSION['LOGIN'])) {
         return false;
     }
     $checkPrevilegy = $ldMssql->query("SELECT previlegy FROM dbo.webPrevilegy WHERE username='" . $_SESSION['LOGIN'] . "'");
     if (mssql_num_rows($checkPrevilegy) == 0) {
         return (int) 0;
     } else {
         return mssql_fetch_object($checkPrevilegy);
     }
 }
开发者ID:neilor,项目名称:MuSite-v2-5-x,代码行数:16,代码来源:sample.module.php

示例8: listAllNotices

 private function listAllNotices()
 {
     global $ldTpl;
     $findNoticeQ = $this->query("SELECT id,subject,date FROM dbo.webNotices ORDER BY date DESC");
     if (mssql_num_rows($findNoticeQ) == 0) {
         $tempTpl = NOTICE_NOT_EXISTS_NOTICES;
     } else {
         $tempTpl .= "<ul>";
         while ($findNotice = mssql_fetch_object($findNoticeQ)) {
             $tempTpl .= "<li><a href=\"?page=readNotice&amp;id=" . $findNotice->id . "\">" . $findNotice->subject . "</a> - " . date("[d/m/Y g:i a]", $findNotice->date) . "</li>";
         }
     }
     $ldTpl->set("ResultNotices", $tempTpl);
 }
开发者ID:neilor,项目名称:MuSite-v2-5-x,代码行数:14,代码来源:ldnotice.class.php

示例9: loadBanned

 private function loadBanned($type)
 {
     global $ldTpl;
     $findBannedQ = $this->query("SELECT * FROM " . DATABASE . ".dbo.webBanneds WHERE type = {$type} ORDER BY name DESC");
     if (mssql_num_rows($findBannedQ) == 0) {
         $tempTpl = "<tr><td align='center' bgcolor='#EDEBDC' colspan='4'>" . BANNED_NO_USERS . "</td></tr>";
     } else {
         while ($findBanned = mssql_fetch_object($findBannedQ)) {
             $tempTpl .= "<tr>\n                                  <td align='center' bgcolor='#EDEBDC'>" . $findBanned->name . "</td>\n                                  <td align='center' bgcolor='#EDEBDC'>" . date("d/m/Y G:i", $findBanned->dateend) . "</td>\n                                  <td align='center' bgcolor='#EDEBDC'>" . $findBanned->bannedBy . "</td>\n                                  <td align='center' bgcolor='#EDEBDC'>" . $findBanned->description . "</td>                           \n                                </tr>";
         }
     }
     $ldTpl->set("BANNED_RESULT", $tempTpl);
     unset($tempTpl);
 }
开发者ID:neilor,项目名称:MuSite-v2-5-x,代码行数:14,代码来源:ldbanned.class.php

示例10: consultaDadosUsuario

 public function consultaDadosUsuario($matricula)
 {
     $matricula = addslashes($matricula);
     $this->conecta();
     $SQL = "SELECT * FROM dbo.pessoa WHERE cod_pessoa_aux = '{$matricula}'";
     $res = mssql_query($SQL, $this->getConmssql());
     // return $res;
     if (mssql_num_rows($res) > 0) {
         $user = mssql_fetch_object($res);
         return $user;
     } else {
         return false;
     }
 }
开发者ID:VicenteTerra,项目名称:validarec,代码行数:14,代码来源:integracaoPergamum.php

示例11: GetVaultContent

 public function GetVaultContent()
 {
     $getLenghts = $this->query("SELECT [length] FROM [syscolumns] WHERE OBJECT_NAME([id]) = 'warehouse' AND [name] = 'Items';");
     $getLenghts = mssql_fetch_object($getLenghts);
     $this->Varbinary = $getLenghts->length;
     $this->LineCounts = $getLenghts->length * 2 / (constant("SYSTEM_DBVERSION") == 1 ? 20 : 32) / 8;
     $this->SlotCounts = $getLenghts->length * 2 / (constant("SYSTEM_DBVERSION") == 1 ? 20 : 32);
     $SQL_Q = $this->query("SELECT 1 FROM warehouse WHERE Accountid='" . $_SESSION['Login'] . "'");
     if (mssql_num_rows($SQL_Q) == 0) {
         $this->query("INSERT INTO warehouse (AccountID, Items, Money, EndUseDate, DbVersion, pw) VALUES ('" . $_SESSION['Login'] . "', 0x" . str_pad("", $this->Varbinary * 2, "F") . ", 0, GetDate(), " . constant("SYSTEM_DBVERSION") . ", 0);");
     }
     $SQL_Q = $this->query("DECLARE @vault varbinary(" . $this->Varbinary . "); SELECT @vault = items FROM warehouse WHERE AccountID='" . $_SESSION['Login'] . "' " . (constant("ENCGAMES_S6") === true ? " AND VaultID = 1" : NULL) . "; PRINT @vault;");
     $this->Vault_Content = substr(mssql_get_last_message($SQL_Q), 2);
 }
开发者ID:neilor,项目名称:MuShopping-v3,代码行数:14,代码来源:vault.class.php

示例12: __construct

 public function __construct()
 {
     global $ODBC, $LD_Items;
     $_GET['ProductID'] = (int) $_GET['ProductID'];
     $SQL_Q = $this->query("SELECT ConnectStat FROM MEMB_STAT WHERE memb___id='" . $_SESSION['Login'] . "'");
     $SQL = mssql_fetch_object($SQL_Q);
     if ($SQL->ConnectStat != 0) {
         exit(Print_error("<ul><li>Voc&ecirc; deve estar offline do jogo para efetuar essa a&ccedil;&atilde;o!</li></ul>"));
     }
     $searchKitQ = $ODBC->query("SELECT priceFix FROM Kits WHERE active = 1 AND Number = " . $_GET['ProductID']);
     if (odbc_num_rows($searchKitQ) == 0) {
         exit(Print_error("<script type=\"text/javascript\">alert(\"Erro kit n&atilde;o cadastrado.\"); window.location='?';</script>"));
     }
     $searchItensKitQ = $ODBC->query("SELECT * FROM KitsItemsDetails WHERE kitNumber = " . $_GET['ProductID']);
     echo "<ul><li>Aguarde em quanto sua compra &eacute; processada.</li><br />";
     //Inicio Função independente para cobrar o kit
     $searchKit = odbc_fetch_object($searchKitQ);
     $SQL_Q = $this->query("SELECT " . GOLDCOLUMN . " FROM " . GOLDTABLE . " WHERE " . GOLDMEMBIDENT . " = '" . $_SESSION['Login'] . "'");
     $SQL_R = mssql_fetch_row($SQL_Q);
     if ($SQL_R[0] < $searchKit->priceFix) {
         exit(Print_error("<ul><li>Desculpe, essa compra n&atilde;o pode ser realizada, pois seu saldo de " . GOLDNAME . " &eacute; insuficiente.</li></ul>"));
     }
     $SQL_Q = $this->query("UPDATE " . GOLDTABLE . " SET " . GOLDCOLUMN . " = " . GOLDCOLUMN . "-" . $searchKit->priceFix . " WHERE " . GOLDMEMBIDENT . " = '" . $_SESSION['Login'] . "' AND " . GOLDCOLUMN . " >= " . $searchKit->priceFix . "; select @@rowcount as rows;");
     $SQL_R = mssql_fetch_object($SQL_Q);
     if ((int) $SQL_R->rows == 0) {
         exit(Print_error("<ul><li>Erro ao cobrar pelo kit.</li></ul>"));
     }
     //Fim Função independente para cobrar o kit
     $ODBC->query("UPDATE Kits SET solds=solds+1 WHERE Number=" . $_GET['ProductID']);
     $searchLastSoldNumberQ = $ODBC->query("SELECT max(Number) as Numb FROM LogSoldsKits");
     $searchLastSoldNumber = odbc_fetch_object($searchLastSoldNumberQ);
     $searchLastSoldNumber->Numb = (int) $searchLastSoldNumber->Numb + 1;
     $ODBC->query("INSERT INTO LogSoldsKits (login,kitNumber,price,data) VALUES ('{$_SESSION['Login']}', {$_GET['ProductID']}, {$searchKit->priceFix}, '" . time() . "')");
     require "sockets.lib.php";
     //exit(var_dump($socketLib));
     while ($searchItensKit = odbc_fetch_object($searchItensKitQ)) {
         //var_dump($searchItensKit);
         $LD_FinishBuy = new LD_FinishBuy($searchItensKit->itemNumber, $searchItensKit->fixLVL, $searchItensKit->fixOP, $searchItensKit->fixANC, $searchItensKit->fixSkill == 0 ? "false" : "true", $searchItensKit->fixLuck == 0 ? "false" : "true", $searchItensKit->fixOpEx1 == 0 ? "false" : "true", $searchItensKit->fixOpEx2 == 0 ? "false" : "true", $searchItensKit->fixOpEx3 == 0 ? "false" : "true", $searchItensKit->fixOpEx4 == 0 ? "false" : "true", $searchItensKit->fixOpEx5 == 0 ? "false" : "true", $searchItensKit->fixOpEx6 == 0 ? "false" : "true", $searchItensKit->fixJH, $searchItensKit->fixRefine == 0 ? "false" : "true", $searchItensKit->fixSocket1 == $socketLib['notSocket'] ? "false" : "true", $searchItensKit->fixSocket2 == $socketLib['notSocket'] ? "false" : "true", $searchItensKit->fixSocket3 == $socketLib['notSocket'] ? "false" : "true", $searchItensKit->fixSocket4 == $socketLib['notSocket'] ? "false" : "true", $searchItensKit->fixSocket5 == $socketLib['notSocket'] ? "false" : "true", $searchItensKit->fixSocket1, $searchItensKit->fixSocket2, $searchItensKit->fixSocket3, $searchItensKit->fixSocket4, $searchItensKit->fixSocket5, true);
         $ODBC->query("INSERT INTO LogSoldsKitsDetails (NumberSoldKit,login,itemId,itemSerial) VALUES ({$searchLastSoldNumber->Numb}, '{$_SESSION['Login']}', '{$searchItensKit->itemNumber}', '{$LD_Items->Item_Serial}')");
         if ($LD_FinishBuy->delivered == true) {
             echo "<li>Item: <strong>{$LD_FinishBuy->NAME}</strong>, entregue.</li>";
         } else {
             echo "<li>Item: <strong>{$LD_FinishBuy->NAME}</strong>, n&atilde;o houve espa&ccedil;o. <br />Libere espa&ccedil;o no bau e reenvie o item pelo hist&oacute;rico de compras.</li>";
         }
         unset($LD_FinishBuy);
     }
     echo "<br /><li>Compra finalizada com sucesso!</li></ul>";
 }
开发者ID:neilor,项目名称:MuShopping-v3,代码行数:48,代码来源:finishbuykits.class.php

示例13: __construct

 public function __construct()
 {
     global $ldTpl, $TABLES_CONFIGS, $PANELUSER_MODULE;
     $tempTpl .= "<table border='0' width='100%'>\n\t\t\t\t\t\t  <tr>\n\t\t\t\t\t\t   <td align='center' bgcolor='#E2DEC5'><strong>" . ONLINES_CHARACTER . "</strong></td>\n\t\t\t\t\t\t   <td align='center' bgcolor='#E2DEC5'><strong>" . ONLINES_CONNECT_IN . "</strong></td>\n\t\t\t\t\t\t   <td align='center' bgcolor='#E2DEC5'><strong>" . ONLINES_RESETS . "</strong></td>\n\t\t\t\t\t\t   <td align='center' bgcolor='#E2DEC5'><strong>" . ONLINES_ACCOUNT_TYPE . "</strong></td>\n\t\t\t\t\t\t   <td align='center' bgcolor='#E2DEC5'><strong>" . ONLINES_SERVER . "</strong></td>\n\t\t\t\t\t\t  </tr>";
     if (empty($_GET['room']) == false && $_GET['room'] != "all") {
         $queryRoom = "AND MEMB_STAT.ServerName = '" . $_GET['room'] . "'";
     }
     $findAccountsOnlineQ = $this->query("Use " . DATABASE_ACCOUNTS . "; SELECT MEMB_STAT.memb___id, MEMB_STAT.ConnectTM, MEMB_STAT.ServerName, AccountCharacter.GameIDC, Character." . COLUMN_RESETS . " as Resets FROM " . DATABASE_ACCOUNTS . ".dbo.MEMB_STAT JOIN " . DATABASE_CHARACTERS . ".dbo.AccountCharacter ON (MEMB_STAT.memb___id = AccountCharacter.Id) JOIN " . DATABASE_CHARACTERS . ".dbo.Character ON (AccountCharacter.GameIDC = Character.Name) WHERE MEMB_STAT.ConnectStat = 1 " . $queryRoom);
     while ($findAccountsOnline = mssql_fetch_object($findAccountsOnlineQ)) {
         ++$i;
         $checkVipQ = $this->query("Use " . DATABASE . "; SELECT " . $TABLES_CONFIGS['WEBVIPS']['columnType'] . " as type FROM " . $TABLES_CONFIGS['WEBVIPS']['database'] . ".dbo." . $TABLES_CONFIGS['WEBVIPS']['table'] . " WHERE " . $TABLES_CONFIGS['WEBVIPS']['columnUsername'] . "='" . $findAccountsOnline->memb___id . "'");
         $checkVip = mssql_fetch_object($checkVipQ);
         $tempTpl .= "<tr>\n\t\t\t\t\t\t\t\t  <td align='center' bgcolor='#EDEBDC'>" . $findAccountsOnline->GameIDC . "</td>\n\t\t\t\t\t\t\t\t  <td align='center' bgcolor='#EDEBDC'>" . $findAccountsOnline->ConnectTM . "</td>\n\t\t\t\t\t\t\t\t  <td align='center' bgcolor='#EDEBDC'>" . $findAccountsOnline->Resets . "</td>\n\t\t\t\t\t\t\t\t  <td align='center' bgcolor='#EDEBDC'>" . $PANELUSER_MODULE['BUY_VIPS']['NAME_FLATS'][(int) $checkVip->type] . "</td>\n\t\t\t\t\t\t\t\t  <td align='center' bgcolor='#EDEBDC'>" . $findAccountsOnline->ServerName . "</td>\n\t\t\t\t\t\t\t\t</tr>";
     }
     $tempTpl .= "<tr><td colspan='5'><em><strong>" . ONLINES_TOTAL_ONLINE . " " . (int) $i . " </strong></em></td></tr></table>";
     $ldTpl->set("ONLINES_ROWS", $tempTpl);
 }
开发者ID:neilor,项目名称:MuSite-v2-5-x,代码行数:17,代码来源:ldonlines.class.php

示例14: __construct

 public function __construct()
 {
     global $LD_Items;
     global $tpl;
     $LD_Items->GetVaultContent();
     $LD_Items->CutSlotsVault();
     $LD_Items->CutHexSlotsVault();
     $SQL_Q = $this->query("SELECT ConnectStat FROM MEMB_STAT WHERE memb___id='" . $_SESSION['Login'] . "'");
     $SQL = mssql_fetch_object($SQL_Q);
     if ($SQL->ConnectStat != 0) {
         $tpl->set("LIST_BOX_ITENS", "<ul><li>Voc&ecirc; deve estar offline do jogo para usar essa op&ccedil;&atilde;o!</li></ul>");
         return;
     }
     if (isset($_GET['WriteVault']) == false) {
         $this->Find_Items();
     } else {
         $this->Fix_Items();
     }
     $tpl->set("LIST_BOX_ITENS", $this->ResponseItems);
 }
开发者ID:neilor,项目名称:MuShopping-v3,代码行数:20,代码来源:recover_broken_item.class.php

示例15: __construct

 public function __construct($account, $dbVersion)
 {
     try {
         global $sqlMu;
         $this->clearVars();
         if (is_numeric($dbVersion) == false) {
             throw new Exception("dbVersion must be numeric.");
         }
         if ($dbVersion < 1 || $dbVersion > 3) {
             throw new Exception("dbVersion invalid.");
         }
         $this->dbVersion = $dbVersion;
         $this->account = $account;
         if ($this->dbVersion == 3) {
             $getLenghts = $sqlMu->query("SELECT [length] FROM [syscolumns] WHERE OBJECT_NAME([id]) = 'warehouse' AND [name] = 'Items';");
             $getLenghts = mssql_fetch_object($getLenghts);
             $this->slotNumbers = $getLenghts->length * 2 / 32;
         }
     } catch (Exception $msg) {
         exit("Vault class error: " . $msg->getMessage());
     }
 }
开发者ID:ADMTec,项目名称:ldManager-MuOnline,代码行数:22,代码来源:ldVault.class.php


注:本文中的mssql_fetch_object函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。