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


PHP COM::execute方法代码示例

本文整理汇总了PHP中COM::execute方法的典型用法代码示例。如果您正苦于以下问题:PHP COM::execute方法的具体用法?PHP COM::execute怎么用?PHP COM::execute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在COM的用法示例。


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

示例1: COM

$myPass = "WU0509Brc";
$myDB = "IABAS2014_ACS_set";

//create an instance of the  ADO connection object
$conn = new COM ("ADODB.Connection")
  or die("Cannot start ADO");

//define connection string, specify database driver
$connStr = "PROVIDER=SQLOLEDB;SERVER=".$myServer.";UID=".$myUser.";PWD=".$myPass.";DATABASE=".$myDB;
  $conn->open($connStr); //Open the connection to the database

//declare the SQL statement that will query the database
$query = "SELECT * FROM CANDIDATOS";

//execute the SQL statement and return records
$rs = $conn->execute($query);

$num_columns = $rs->Fields->Count();
echo $num_columns . "<br>"; 

for ($i=0; $i < $num_columns; $i++) {
    $fld[$i] = $rs->Fields($i);
}

echo "<table>";

while (!$rs->EOF)  //carry on looping through while there are records
{
    echo "<tr>";
    for ($i=0; $i < $num_columns; $i++) {
        echo "<td>" . $fld[$i]->value . "</td>";
开发者ID:Toniato,项目名称:TESTE,代码行数:31,代码来源:EMAIL.PHP

示例2: getInvitationList

 /**
  * Get Invitation List from database
  **/
 function getInvitationList()
 {
     // Require DB Config
     require_once "../lib/picasa/config.php";
     // Records Array
     $allRec = array();
     // Create an instance of ADO connection object
     $conn = new COM("ADODB.Connection") or die("Cannot start ADO");
     // Define connection string, specify database driver
     $connStr = "PROVIDER=SQLOLEDB;SERVER=" . $server . ";UID=" . $username . ";PWD=" . $passwd . ";DATABASE=" . $db;
     $conn->open($connStr);
     //Open the connection to the database
     //SQL statement that will query the database
     $query = "SELECT * FROM tbl_picasa";
     //execute SQL statement and return records
     $rs = $conn->execute($query);
     $num_columns = $rs->Fields->Count();
     for ($i = 0; $i < $num_columns; $i++) {
         $fld[$i] = $rs->Fields($i);
     }
     while (!$rs->EOF) {
         $rec = array();
         for ($i = 0; $i < $num_columns; $i++) {
             array_push($rec, $fld[$i]->value);
         }
         array_push($allRec, $rec);
         $rs->MoveNext();
         //move on to the next record
     }
     //close the connection and recordset objects freeing up resources
     $rs->Close();
     $conn->Close();
     $rs = null;
     $conn = null;
     return $allRec;
 }
开发者ID:bayinteractive,项目名称:SWX-Picasa-API,代码行数:39,代码来源:Picasa.php

示例3: COM

    }
}
////////////////////////////../PHP/certificado.php
//create an instance of the  ADO connection object
$conn = new COM("ADODB.Connection") or die("Cannot start ADO");
//define connection string, specify database driver
//$connStr = "Microsoft.ACE.OLEDB.12.0;Data Source=D:\inetpub\wwwroot\Dropbox\BDs\Arrendamientos.mdb";
//Siteserver//$connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Domains\ventayrenta.info\database\Arrendamientos.mdb";
$connStr = "provider= Microsoft.ACE.OLEDB.12.0;Data Source=D:\\inetpub\\wwwroot\\Dropbox\\BDs\\Arrendamientos.mdb";
$conn->open($connStr);
//Open the connection to the database
//declare the SQL statement that will query the database
$query = "SELECT r.*, a.CalleYNumeroDelDomicilio, a.Colonia, a.CodigoPostal, a.DelegacionOMunicipio, a.Ciudad, a.Estado, a.GiroDelInmuebleArrendado, a.PropietarioCve, a.estado FROM registro_proteccion r, arrendamientos a WHERE r.arrcve=a.arrcve AND r.REGCVE='" . $_REQUEST['arrcve'] . "' AND r.NoAutorizacion=" . $_REQUEST['NoAutorizacion'];
//echo($query."<p>");
//execute the SQL statement and return records
$rs = $conn->execute($query);
if (!$rs->EOF) {
    //echo $query;
    $num_columns = $rs->Fields->Count();
    //echo($num_columns);
    for ($i = 0; $i < $num_columns; $i++) {
        $fld[$i] = $rs->Fields($i);
    }
    $Gtomadeposecion = "15,000.00";
    $diasN = "20";
    $calle = ucwords(strtolower($fld[48]->value));
    $Colonia = ucwords(strtolower($fld[49]->value));
    $Del_Mun = ucwords(strtolower($fld[51]->value));
    $Estado = ucwords(strtolower(NEstados($fld[53]->value)));
    $CP = $fld[50]->value;
    $GiroInm = $fld[54]->value;
开发者ID:abisaigarcia,项目名称:Contratos-SISI,代码行数:31,代码来源:certificado.php


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