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


PHP mssql_result函数代码示例

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


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

示例1: getLastId

 public function getLastId()
 {
     try {
         $result = $this->query("SELECT LAST_INSERT_ID()");
         $id = mssql_result($result, 0, 0);
     } catch (Exception $e) {
         throw new DbControlException("Error in trying to acquire Last inserted id.\n" . $e->getMessage(), $e->getCode());
     }
     return $id;
 }
开发者ID:palmic,项目名称:lbox,代码行数:10,代码来源:class.DbMssql.php

示例2: Count

 function Count()
 {
     $_count_command = "SELECT COUNT(*) FROM (" . $this->SelectCommand . ") AS _TMP {where}";
     $_where = "";
     $_filters = $this->Filters;
     for ($i = 0; $i < sizeof($_filters); $i++) {
         $_where .= " and " . $this->GetFilterExpression($_filters[$i]);
     }
     if ($_where != "") {
         $_where = "WHERE " . substr($_where, 5);
     }
     $_count_command = str_replace("{where}", $_where, $_count_command);
     $_result = mssql_query($_count_command, $this->_Link);
     return mssql_result($_result, 0, 0);
 }
开发者ID:skydel,项目名称:universal-online-exam,代码行数:15,代码来源:MSSQLDataSource.php

示例3: getFile

 public function getFile($id, $target)
 {
     ### buscar por nkey
     $query = "select  image, ext from doc_image where nkey =" . $id;
     $r = $this->_conn->_query($query);
     $data = mssql_result($r, 0, 'image');
     $ext = mssql_result($r, 0, 'ext');
     file_put_contents($target, $data);
     $result = $ext;
     /*foreach($data[0] as $k => $v){
       
            if($k!='image')   {
                $result[$k]=$v;
        }
        
        }
         */
     ## devuelve array
     return $result;
     ## retornar string
 }
开发者ID:eescallon,项目名称:upload,代码行数:21,代码来源:documento.php

示例4: md5

    $res = '';
    $res = @mssql_result(mssql_query("select valor_res from tbformatosresultados3\n\twhere formato_res=" . $FORMATO_RES . " and ods_res=" . $ODS_RES . "\n\tand campo_res='" . md5($row2["CAMPO_FOR"]) . "'"), 0, 0);
    if ($row2["TIPO_FOR"] == 4) {
        if ($res == 1) {
            $document->setValue($row2["CAMPO_FOR"], '</w:t><w:t xml:space="preserve">          - ' . utf8_encode($row2["CAMPO_FOR"]) . '<w:br/>');
        } else {
            $document->setValue($row2["CAMPO_FOR"], '');
        }
    } else {
        $document->setValue($row2["CAMPO_FOR"], utf8_encode($res));
    }
}
$sql2 = mssql_query("select FORMATO_FOR, CAMPO_FOR, TIPO_FOR from tbformatosresultados2\ninner join TbProductos3 on\nFORMATO_FOR = FORMATO_FPR\nINNER JOIN TBEXPEDIENTES2 ON\nBAREMO_EXP = PRODUCTO_FPR\nWHERE CODIGO_EXP=" . $ODS_RES . " AND\nFORMATO_FOR <> " . $FORMATO_RES);
while ($row2 = mssql_fetch_array($sql2)) {
    $res = '';
    $res = @mssql_result(mssql_query("select valor_res from tbformatosresultados3\n\twhere formato_res=" . $row2["FORMATO_FOR"] . " and ods_res=" . $ODS_RES . "\n\tand campo_res='" . md5($row2["CAMPO_FOR"]) . "'"), 0, 0);
    if ($row2["TIPO_FOR"] == 4) {
        if ($res == 1) {
            $document->setValue($row2["CAMPO_FOR"], '</w:t><w:t xml:space="preserve">          - ' . utf8_encode($row2["CAMPO_FOR"]) . '<w:br/>');
        } else {
            $document->setValue($row2["CAMPO_FOR"], '');
        }
    } else {
        $document->setValue($row2["CAMPO_FOR"], utf8_encode($res));
    }
}
$sql = mssql_query("SELECT \nPAC.NOMBRE_PAC NOMBRE_PACIENTE,\nPAC.CEDULA_PAC CEDULA_PACIENTE,\nTIT.NOMBRE_PAC NOMBRE_TITULAR,\nTIT.CEDULA_PAC CEDULA_TITULAR,\nNOMBRE_CLI SEGURO,\nNOMBRE_PRV PROVEEDOR,\nRIF_PRV RIF,\nDIRECCION_PRV DIRECCION,\nNOMBRE_PRO BAREMO\nFROM TbExpedientes2 \nINNER JOIN TBEXPEDIENTES\nON TBEXPEDIENTES2.EXPEDIENTE_EXP=TBEXPEDIENTES.CODIGO_EXP\nLEFT JOIN TBPACIENTES PAC ON\nPACIENTE_EXP=PAC.CODIGO_PAC\nLEFT JOIN TBPACIENTES TIT ON\nTIT.CODIGO_PAC = CASE WHEN PAC.TITULAR_PAC=1 THEN PAC.CODIGO_PAC ELSE PAC.CODIGOTITULAR_PAC END\nLEFT JOIN TBPRODUCTOS ON\nCODIGO_PRO = BAREMO_EXP\nLEFT JOIN TBCLIENTES ON \nCODIGO_CLI = CLIENTE_EXP\nLEFT JOIN TBPROVEEDORES ON\nCODIGO_PRV = PROVEEDOR_EXP WHERE TBEXPEDIENTES2.CODIGO_EXP=" . $ODS_RES);
while ($row2 = mssql_fetch_array($sql, MSSQL_ASSOC)) {
    foreach ($row2 as $k => $v) {
        $document->setValue($k, utf8_encode($v));
    }
开发者ID:lflores10,项目名称:octa,代码行数:31,代码来源:res.php

示例5: ResultDB

function ResultDB($result, $RowNumber)
{
    include "includes/variables.php";
    include_once "lib/multidbconnection.php";
    $dbLinkFunc = Open($dbtype, $connecttype, $dbhost, $dbuser, $dbpass, $dbname);
    switch ($dbtype) {
        case "mssql":
            $r = mssql_result($result, $RowNumber);
            break;
        case "mysql":
            $r = mysql_result($result, $RowNumber);
            break;
        case "pg":
            $r = pg_result($result, $RowNumber);
            break;
        default:
            $r = False;
            break;
    }
    return $r;
}
开发者ID:laiello,项目名称:ebpls,代码行数:21,代码来源:dbFunctions.php

示例6: Result

function Result($dbType, $result, $RowNumber)
{
    switch ($dbType) {
        case "mssql":
            $r = mssql_result($result, $RowNumber);
            break;
        case "mysql":
            $r = @mysql_result($result, $RowNumber);
            break;
        case "pg":
            $r = pg_result($result, $RowNumber);
            break;
        default:
            $r = False;
            break;
    }
    return $r;
}
开发者ID:laiello,项目名称:ebpls,代码行数:18,代码来源:multidbconnection.php

示例7: affected_rows

 /**
 \brief      Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE
 \see    	num_rows
 \param      resultset   Curseur de la requete voulue
 \return     int		    Nombre de lignes
 */
 function affected_rows($resultset)
 {
     // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
     if (!is_resource($resultset)) {
         $resultset = $this->results;
     }
     // mssql necessite un link de base pour cette fonction contrairement
     // a pqsql qui prend un resultset
     $rsRows = mssql_query("select @@rowcount as rows", $this->db);
     return mssql_result($rsRows, 0, "rows");
     //return mssql_affected_rows($this->db);
 }
开发者ID:netors,项目名称:dolibarr,代码行数:18,代码来源:mssql.lib.php

示例8: _checkSequence

 /**
  * Checks if there's a sequence that exists.
  *
  * @param  string $seq_name    The sequence name to verify.
  * @return bool   $tableExists The value if the table exists or not
  * @access private
  */
 function _checkSequence($seq_name)
 {
     $query = "SELECT * FROM {$seq_name}";
     $tableExists =& $this->_doQuery($query, true);
     if (PEAR::isError($tableExists)) {
         if ($tableExists->getCode() == MDB2_ERROR_NOSUCHTABLE) {
             return false;
         }
         //return $tableExists;
         return false;
     }
     return mssql_result($tableExists, 0, 0);
 }
开发者ID:ajisantoso,项目名称:kateglo,代码行数:20,代码来源:mssql.php

示例9: server_version

 /**
  * Returns the server version string.
  *
  * @return string
  */
 function server_version()
 {
     $result = $this->query('SELECT @@version AS SERVER_VERSION');
     $version = mssql_result($result, 0, 'SERVER_VERSION');
     if (isset($version)) {
         return $version;
     }
 }
开发者ID:atlcurling,项目名称:tkt,代码行数:13,代码来源:Mssql.php

示例10: trim

$tag = trim($tag);
$hostname = "16.187.224.111";
//MSSQL服务器的IP地址 或 服务器的名字
$dbuser = "keren";
//MSSQL服务器的帐号
$dbpasswd = "keren123";
//MSSQL服务器的密码
$dbname = "PLOdb";
//数据库的名字
$conn = mssql_connect($hostname, $dbuser, $dbpasswd);
//连接MSSQL
mssql_select_db($dbname);
/*连接要访问的数据库 这里也可以写做 $db=mssql_select_db($dbname,$conn);*/
$sql = "select MEMBERID\n\tfrom dbo.KitWeight \n\twhere Name='{$tag}'\n\t";
//sql语句
$result = mssql_query($sql);
$ID = mssql_result($result, 0, 0);
$before = $ID - 50;
$after = $ID + 50;
$sql = "select Name, Weight\n\tfrom dbo.kitWeight\n\twhere MEMBERID<'{$after}'AND MEMBERID>'{$before}'";
$result = mssql_query($sql);
while ($row1 = mssql_fetch_assoc($result)) {
    extract($row1);
    echo "<tr>";
    echo "<th>{$Name}</th>";
    echo "<th>{$Weight}</th>";
    echo "</tr>";
}
?>
</table>
开发者ID:aaronleslie,项目名称:aarongit,代码行数:30,代码来源:queryweight.php

示例11: result

 function result($query, $row)
 {
     return @mssql_result($query, $row);
 }
开发者ID:hcd2008,项目名称:destoon,代码行数:4,代码来源:db_mssql.class.php

示例12: mssql_query

                	<?php 
if (mssql_result(mssql_query("select count(*) from tbexpedientes2 where codigo_exp='{$id}' and anulado_exp=1"), 0, 0) > 0) {
    $sq = mssql_query("select top 1 \n\t\t\t\t\t\t\tdescripcion,\n\t\t\t\t\t\t\t(select top 1 nombre from tbusuarios where login=USUARIO),\n\t\t\t\t\t\t\tconvert(nvarchar,fecha,103)\n\t\t\t\t\t\t\t from TbAuditoria where accion='A' and modulo='Expedientes2' and CODIGO='{$id}' order by fecha, hora desc");
    if (mssql_num_rows($sq) > 0) {
        ?>
						<fieldset style="background-color:#FFEED7">
							<legend>ANULADO POR <?php 
        echo strtoupper(mssql_result($sq, 0, 1));
        ?>
</legend>
							<br /><b>Motivo: <?php 
        echo mssql_result($sq, 0, 0);
        ?>
</b><br /><br />
                            <b>Fecha: <?php 
        echo mssql_result($sq, 0, 2);
        ?>
</b>
						</fieldset>
						<?php 
    } else {
        ?>
							<textarea name="NOTA_EXP" style="width:96%" rows="5"></textarea>
						<?php 
    }
} else {
    ?>
						<textarea name="NOTA_EXP" style="width:96%" rows="5"></textarea>
                    <?php 
}
?>
开发者ID:lflores10,项目名称:octa,代码行数:31,代码来源:ods.php

示例13:

<!--AR-->
<div class="divdatatoolbar"><ul class="datatoolbar">
	<li class="topfirst">
    	<a href="#" onclick="clearForm();">
    		<div align="center"><img src="icon/32/nuevo.png" width="18" height="18"></div>
        	Nuevo F2
       	</a>
    </li>
    <?php 
if (mssql_result(mssql_query("select count(*) from Tbfacturacion1 where entrega_fac={$id}"), 0, 0) > 0 || mssql_result(mssql_query("select count(*) from Tbprefacturacion1 where entrega_fac={$id}"), 0, 0) > 0) {
    $formeditable = "false";
} else {
    $formeditable = "true";
    ?>
	<li>
    	<a onclick="saveForm('<?php 
    echo $frm;
    ?>
');">
    		<div align="center"><img src="icon/32/guardar.png" width="18" height="18"></div>
        	Guardar F4
       	</a>
    </li>
    <?php 
}
?>
    <li>
    	<a onclick="searchForm(); Buscanota=1;">
    		<div align="center"><img src="icon/32/buscar.png" width="18" height="18"></div>
        	Buscar F8
       	</a>
开发者ID:lflores10,项目名称:octa,代码行数:31,代码来源:notasdentrega.php

示例14: Prekit2

 public function Prekit2()
 {
     /* if(isset($_REQUEST['query']))
     		{
             echo '确定';
     		}
     		if(isset($_REQUEST['update']))
     		{
             echo '取消';
     		} */
     $Prekit1 = D('Prekit1');
     date_default_timezone_set('Asia/Shanghai');
     $RECORDTIME = date('Y-m-d H:i');
     $data['KEYPN'] = I('post.KEYPN');
     $keypn = $data['KEYPN'];
     $keypn = strtoupper($keypn);
     //echo $keypn;
     if ($keypn == '') {
         $output1 = "";
         $this->assign('output1', $output1);
         $this->display();
         exit;
     }
     $hostname = "16.187.224.112";
     //MSSQL服务器的IP地址 或 服务器的名字
     $dbuser = "sa";
     //MSSQL服务器的帐号
     $dbpasswd = "support";
     //MSSQL服务器的密码
     $dbname = "CPMOData1";
     //数据库的名字
     $conn = mssql_connect($hostname, $dbuser, $dbpasswd);
     //连接MSSQL
     mssql_select_db($dbname);
     $sql = "\n\t\tselect ZMODPN \n\t\tfrom CPMOData1.dbo.Prekit3\n\t\twhere KEYPN='{$keypn}'\n\t\t";
     //sql语句
     $result = mssql_query($sql);
     $ZMODPN = mssql_result($result, 0, 0);
     //把查询的值集合在变量
     $ZMODPN1 = mssql_result($result, 1, 0);
     //把查询的值集合在变量
     $Prekit1 = D('Prekit1');
     $data['ZMODPN'] = $ZMODPN;
     $data['RECORDTIME'] = $RECORDTIME;
     $output = $Prekit1->where("ZMODPN='{$ZMODPN}'")->select();
     $this->assign('output', $output);
     if ($ZMODPN1 != '') {
         $data['ZMODPN'] = $ZMODPN1;
         $data['RECORDTIME'] = $RECORDTIME;
         $output1 = $Prekit1->where("ZMODPN='{$ZMODPN1}'")->select();
         $this->assign('output1', $output1);
         //VAR_DUMP($output1);
     }
     $this->display();
     //echo $keypn;
 }
开发者ID:aaronleslie,项目名称:aarongit,代码行数:56,代码来源:Prekit1Controller.class.php

示例15: AffectedRows

 function AffectedRows(&$affected_rows)
 {
     if (!$this->connection) {
         return $this->SetError("Affected rows", "it was not established a connection with the Microsoft SQL server");
     }
     if ($this->affected_rows == -1) {
         if ($result = mssql_query("SELECT @@ROWCOUNT", $this->connection)) {
             if (mssql_num_rows($result) != 1) {
                 return $this->SetError("Affected rows", "Microsoft SQL server did not return one row with the number of affected rows");
             }
             $this->affected_rows = intval(mssql_result($result, 0, 0));
             mssql_free_result($result);
         } else {
             return $this->SetMSSQLError("Affected rows", "Could not retrieve the number of affected rows of a Microsoft SQL server database");
         }
     }
     $affected_rows = $this->affected_rows;
     return 1;
 }
开发者ID:BackupTheBerlios,项目名称:zvs,代码行数:19,代码来源:metabase_mssql.php


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