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


PHP ADODB_mysqli::GetRow方法代码示例

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


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

示例1: handleWork

 function handleWork($msgId)
 {
     $message = $this->db->GetRow("SELECT server_id, message, id, handle_attempts FROM messages WHERE id=?", array($msgId));
     try {
         if ($message['handle_attempts'] >= 3) {
             $this->db->Execute("UPDATE messages SET status=? WHERE id=?", array(MESSAGE_STATUS::FAILED, $message['id']));
         } else {
             try {
                 $DBServer = DBServer::LoadByID($message['server_id']);
             } catch (Exception $e) {
                 $this->db->Execute("UPDATE messages SET status=? WHERE id=?", array(MESSAGE_STATUS::FAILED, $message['id']));
                 return;
             }
             if ($DBServer->status == SERVER_STATUS::RUNNING || $DBServer->status == SERVER_STATUS::INIT || $DBServer->status == SERVER_STATUS::IMPORTING || $DBServer->status == SERVER_STATUS::TEMPORARY || $DBServer->status == SERVER_STATUS::PENDING_TERMINATE) {
                 $msg = $this->messageSerializer->unserialize($message['message']);
                 $msg->dbMessageId = $message['id'];
                 $DBServer->SendMessage($msg);
             } elseif (in_array($DBServer->status, array(SERVER_STATUS::TROUBLESHOOTING, SERVER_STATUS::TERMINATED, SERVER_STATUS::SUSPENDED))) {
                 $this->db->Execute("UPDATE messages SET status=? WHERE id=?", array(MESSAGE_STATUS::FAILED, $message['id']));
             }
         }
     } catch (Exception $e) {
         //var_dump($e->getMessage());
     }
 }
开发者ID:rickb838,项目名称:scalr,代码行数:25,代码来源:MessagingQueue.php

示例2: inspectCollection

 /**
  * @param int $cID
  * @param int $cvID
  */
 public function inspectCollection($cID, $cvID)
 {
     $this->write("Collection {$cID} @ version {$cvID}");
     ++$this->indent;
     $cID = (int) $cID;
     $cvID = (int) $cvID;
     $c = $this->cn->GetRow('
         select
             CollectionVersions.cvName,
             CollectionVersions.cvHandle,
             CollectionVersions.cvComments,
             CollectionVersions.cvIsApproved,
             PagePaths.cPath
         from
             CollectionVersions
             left join PagePaths
                 on CollectionVersions.cID = PagePaths.cID
         where
             CollectionVersions.cID = ?
             and CollectionVersions.cvID = ?
         order by
             PagePaths.ppIsCanonical desc
     ', array($cID, $cvID));
     if (empty($c)) {
         $this->write("COLLECTION VERSION {$cvID} NOT FOUND FOR COLLECTION {$cID}!");
     } else {
         $this->write('Name    : ' . (string) $c['cvName']);
         $this->write('Handle  : ' . (string) $c['cvHandle']);
         $this->write('Approved: ' . ($c['cvIsApproved'] ? 'yes' : 'no'));
         $this->write('Path    : ' . (string) $c['cPath']);
         $this->write('comments: ' . (string) $c['cvComments']);
     }
     --$this->indent;
 }
开发者ID:mlocati,项目名称:concrete5-deeply,代码行数:38,代码来源:Analyzer.php

示例3: bindSalesOrder

 /**
  * @param Scalr_Service_ZohoCrm_Entity_SalesOrder $salesOrder
  * @param Client $client
  * @param int $invoiceId
  */
 private function bindSalesOrder($salesOrder, $client, $invoiceId)
 {
     $invoice = $this->db->GetRow("SELECT * FROM payments WHERE id = ?", array($invoiceId));
     $packageId = $client->GetSettingValue(CLIENT_SETTINGS::BILLING_PACKAGE);
     $package = $this->db->GetRow("SELECT * FROM billing_packages WHERE id = ?", array($packageId));
     $salesOrder->accountId = $client->GetSettingValue(CLIENT_SETTINGS::ZOHOCRM_ACCOUNT_ID);
     $salesOrder->subject = sprintf('Monthly fee $%s (%s)', $invoice["amount"], date("F y", strtotime($invoice["dtpaid"])));
     $salesOrder->discount = 0;
     $salesOrder->tax = 0;
     $salesOrder->subTotal = $package["cost"];
     $salesOrder->grandTotal = $package["cost"];
     $salesOrder->status = "Delivered";
     $salesOrder->setProperty(Scalr_Integration_ZohoCrm_CustomFields::PAYMENT_SUBSCRIPTION_ID, $invoice["subscriptionid"]);
     // Add product
     $productDetail = new Scalr_Service_ZohoCrm_Entity_ProductDetail();
     $productDetail->productId = Scalr_Integration_ZohoCrm_CustomFields::$BILLING_PACKAGE_PRODUCT_ID_MAP[$packageId];
     $productDetail->quantity = 1;
     $productDetail->listPrice = $package["cost"];
     $productDetail->discount = 0;
     $productDetail->tax = 0;
     $productDetail->total = $package["cost"];
     $productDetail->totalAfterDiscount = $package["cost"];
     $productDetail->netTotal = $package["cost"];
     $salesOrder->addProductDetail($productDetail);
 }
开发者ID:recipe,项目名称:scalr,代码行数:30,代码来源:DefaultMediator.php

示例4: loadById

 /**
  *
  * @param integer $id
  */
 public function loadById($id)
 {
     $info = $this->db->GetRow("SELECT * FROM {$this->dbTableName} WHERE {$this->dbPrimaryKey}=?", array($id));
     if (!$info) {
         throw new Exception(sprintf(_($this->dbMessageKeyNotFound), $id));
     }
     return $this->loadBy($info);
 }
开发者ID:rickb838,项目名称:scalr,代码行数:12,代码来源:Model.php

示例5: loadById

 /**
  * @return Scalr\Farm\Role\FarmRoleStorageDevice
  */
 public function loadById($id)
 {
     $info = $this->db->GetRow("SELECT * FROM farm_role_storage_devices WHERE storage_id = ? LIMIT 1", array($id));
     if (!$info) {
         return false;
     }
     $this->farmRoleId = $info['farm_role_id'];
     $this->serverIndex = $info['server_index'];
     $this->storageConfigId = $info['storage_config_id'];
     $this->envId = $info['env_id'];
     $this->cloudLocation = $info['cloudLocation'];
     $this->config = @json_decode($info['config']);
     $this->storageId = $info['storage_id'];
     $this->status = $info['status'];
     $this->placement = $info['placement'];
     return $this;
 }
开发者ID:sacredwebsite,项目名称:scalr,代码行数:20,代码来源:FarmRoleStorageDevice.php

示例6: __construct

 public function __construct(\DBFarmRole $dbFarmRole, $serviceId)
 {
     $this->db = \Scalr::getDb();
     $this->farmRole = $dbFarmRole;
     $this->serviceId = $serviceId;
     $this->farmRoleId = $this->farmRole->ID;
     $this->serviceId = $serviceId;
     $service = $this->db->GetRow("SELECT * FROM farm_role_cloud_services WHERE id = ? AND farm_role_id = ?", array($serviceId, $this->farmRole->ID));
     if ($service) {
         $this->envId = $service['env_id'];
         $this->farmId = $service['farmId'];
         $this->type = $service['type'];
         $this->platform = $service['platform'];
         $this->cloudLocation = $service['cloud_location'];
         $this->exists = true;
     } else {
         $this->envId = $this->farmRole->GetFarmObject()->EnvID;
         $this->farmId = $this->farmRole->FarmID;
         $this->platform = $this->farmRole->Platform;
         $this->cloudLocation = $this->farmRole->CloudLocation;
         $this->exists = false;
     }
 }
开发者ID:recipe,项目名称:scalr,代码行数:23,代码来源:FarmRoleService.php

示例7: hasTableReferencedColumn

 /**
  * (non-PHPdoc)
  * @see \Scalr\Upgrade\UpdateInterface::hasTableReferencedColumn()
  */
 public function hasTableReferencedColumn($referencedTable, $referencedColumn, $referencedSchema = null)
 {
     $row = $this->db->GetRow("\n            SELECT * FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE s\n            WHERE s.REFERENCED_TABLE_SCHEMA = " . (isset($referencedSchema) ? $this->db->qstr($referencedSchema) : "DATABASE()") . "\n            AND s.REFERENCED_TABLE_NAME = ?\n            AND s.REFERENCED_COLUMN_NAME = ?\n            LIMIT 1\n        ", array($referencedTable, $referencedColumn));
     return isset($row['CONSTRAINT_NAME']) ? true : false;
 }
开发者ID:rickb838,项目名称:scalr,代码行数:9,代码来源:AbstractUpdate.php

示例8: getAccountRole

 /**
  * Gets role of account level
  *
  * @param   string    $accountRoleId  The ID of the account role
  * @param   int       $accountId      optional Restricts result by identifier of the account
  * @return  Scalr\Acl\Role\AccountRoleObject    Returns AccountRoleObject for the specified ID of account role.
  *                                    It returns null if object does not exist.
  * @throws  Exception\AclException
  */
 public function getAccountRole($accountRoleId, $accountId = null)
 {
     $rec = $this->db->GetRow("\n            SELECT `account_role_id`, `account_id`, `role_id`, `name`, `color`, `is_automatic`\n            FROM `acl_account_roles`\n            WHERE `account_role_id` = ?\n            " . (!empty($accountId) ? " AND `account_id` = " . intval($accountId) : "") . "\n            LIMIT 1\n        ", array($accountRoleId));
     if ($rec !== false) {
         $role = $this->getAccountRoleByRow($rec);
     }
     return isset($role) ? $role : null;
 }
开发者ID:recipe,项目名称:scalr,代码行数:17,代码来源:Acl.php

示例9: getLastRequest

 public function getLastRequest()
 {
     return $this->db->GetRow('SELECT fl.*, u.email AS request_user_email FROM `farm_lease_requests` fl
         LEFT JOIN account_users u ON fl.request_user_id = u.id
         WHERE farm_id = ? ORDER BY id DESC LIMIT 1', array($this->farm->ID));
 }
开发者ID:mheydt,项目名称:scalr,代码行数:6,代码来源:FarmLease.php

示例10: worker


//.........这里部分代码省略.........
                     $event = new RebootBeginEvent($dbserver);
                 } elseif ($message instanceof Scalr_Messaging_Msg_RebootFinish) {
                     if (!$dbserver->localIp && $message->localIp) {
                         $dbserver->localIp = $message->localIp;
                         $dbserver->Save();
                     }
                     $event = new RebootCompleteEvent($dbserver);
                 } elseif ($message instanceof Scalr_Messaging_Msg_BeforeHostUp) {
                     $event = new BeforeHostUpEvent($dbserver);
                     try {
                         $dbserver->updateTimelog('ts_bhu');
                     } catch (Exception $e) {
                     }
                 } elseif ($message instanceof Scalr_Messaging_Msg_BlockDeviceAttached) {
                     if ($dbserver->platform == SERVER_PLATFORMS::EC2) {
                         $aws = $dbserver->GetEnvironmentObject()->aws($dbserver->GetProperty(EC2_SERVER_PROPERTIES::REGION));
                         $instanceId = $dbserver->GetProperty(EC2_SERVER_PROPERTIES::INSTANCE_ID);
                         //The main goal of using filters there is to considerably decrease the size of the response.
                         $volumes = $aws->ec2->volume->describe(null, array(array('name' => VolumeFilterNameType::attachmentInstanceId(), 'value' => (string) $instanceId), array('name' => VolumeFilterNameType::attachmentDevice(), 'value' => (string) $message->deviceName), array('name' => VolumeFilterNameType::status(), 'value' => AMAZON_EBS_STATE::IN_USE)));
                         foreach ($volumes as $volume) {
                             /* @var $volume Scalr\Service\Aws\Ec2\DataType\VolumeData */
                             if ($volume->status == AMAZON_EBS_STATE::IN_USE && count($volume->attachmentSet) && $volume->attachmentSet[0]->instanceId == $instanceId && $volume->attachmentSet[0]->device == $message->deviceName) {
                                 $message->volumeId = $volume->volumeId;
                             }
                         }
                         //Releases memory
                         unset($volumes);
                         $dbserver->GetEnvironmentObject()->getContainer()->release('aws');
                         unset($aws);
                     }
                     $event = new EBSVolumeAttachedEvent($dbserver, $message->deviceName, $message->volumeId);
                 } elseif ($message instanceof Scalr_Messaging_Msg_BlockDeviceMounted) {
                     // Single volume
                     $ebsinfo = $this->db->GetRow("\n                            SELECT * FROM ec2_ebs WHERE volume_id=? LIMIT 1\n                        ", array($message->volumeId));
                     if ($ebsinfo) {
                         $this->db->Execute("\n                                UPDATE ec2_ebs\n                                SET mount_status=?, isfsexist='1'\n                                WHERE id=?\n                            ", array(EC2_EBS_MOUNT_STATUS::MOUNTED, $ebsinfo['id']));
                     }
                     $event = new EBSVolumeMountedEvent($dbserver, $message->mountpoint, $message->volumeId, $message->deviceName);
                 } elseif ($message instanceof Scalr_Messaging_Msg_RebundleResult) {
                     if ($message->status == Scalr_Messaging_Msg_RebundleResult::STATUS_OK) {
                         $metaData = array('szr_version' => $message->meta[Scalr_Messaging_MsgMeta::SZR_VERSION], 'dist' => $message->dist, 'os' => $message->os, 'software' => $message->software);
                         if ($dbserver->platform == SERVER_PLATFORMS::EC2) {
                             if ($message->aws) {
                                 if ($message->aws->rootDeviceType == 'ebs') {
                                     $tags[] = ROLE_TAGS::EC2_EBS;
                                 }
                                 if ($message->aws->virtualizationType == 'hvm') {
                                     $tags[] = ROLE_TAGS::EC2_HVM;
                                 }
                             } else {
                                 $aws = $dbserver->GetEnvironmentObject()->aws($dbserver);
                                 try {
                                     $info = $aws->ec2->image->describe($dbserver->GetProperty(EC2_SERVER_PROPERTIES::AMIID))->get(0);
                                     if ($info->rootDeviceType == 'ebs') {
                                         $tags[] = ROLE_TAGS::EC2_EBS;
                                     } else {
                                         try {
                                             $bundleTask = BundleTask::LoadById($message->bundleTaskId);
                                             if ($bundleTask->bundleType == SERVER_SNAPSHOT_CREATION_TYPE::EC2_EBS) {
                                                 $tags[] = ROLE_TAGS::EC2_EBS;
                                             }
                                         } catch (Exception $e) {
                                         }
                                     }
                                     if ($info->virtualizationType == 'hvm') {
                                         $tags[] = ROLE_TAGS::EC2_HVM;
开发者ID:sacredwebsite,项目名称:scalr,代码行数:67,代码来源:ScalarizrMessaging.php

示例11: hasTableReferencedColumn

 /**
  * (non-PHPdoc)
  * @see \Scalr\Upgrade\UpdateInterface::hasTableReferencedColumn()
  */
 public function hasTableReferencedColumn($referencedTable, $referencedColumn, $referencedSchema = null)
 {
     $referencedSchema = $referencedSchema ?: $this->container->config('scalr.connections.mysql.name');
     $row = $this->db->GetRow("\n            SELECT * FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE\n            WHERE REFERENCED_TABLE_SCHEMA = ?\n            AND REFERENCED_TABLE_NAME = ?\n            AND REFERENCED_COLUMN_NAME = ?\n            LIMIT 1\n        ", array($referencedSchema, $referencedTable, $referencedColumn));
     return isset($row['CONSTRAINT_NAME']) ? true : false;
 }
开发者ID:recipe,项目名称:scalr,代码行数:10,代码来源:AbstractUpdate.php


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