當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。