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


PHP Connection::select方法代码示例

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


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

示例1: Connection

}
?>
</select>
<input type='submit' name='Ajouter' value='Supprimer cette catégorie' />
</fieldset>
</form>

<h2>Supprimer un document</h2>
<form action='index.php' method='POST'>
<fieldset>
<input type='hidden' name='action' value='untrain'/>
Document à supprimer :
<select name='docid'>
<?php 
$con = new Connection($login, $pass, $server, $db);
$rs = $con->select("SELECT * FROM nb_references");
while (!$rs->EOF()) {
    echo "<option value='" . $rs->f('id') . "'>" . $rs->f('id') . " - " . $rs->f('category_id') . "</option>\n";
    $rs->moveNext();
}
?>
</select>
<input type='submit' name='Ajouter' value='Supprimer ce document' />
</fieldset>
</form>

<pre>
   This file is part of PHP Naive Bayesian Filter.

   The Initial Developer of the Original Code is
   Loic d'Anterroches [loic xhtml.net].
开发者ID:nagaexe,项目名称:PHP-Naive-Bayesian-Filter,代码行数:31,代码来源:index.php

示例2: toFluent

 /**
  * Returns this data source wrapped in Fluent object.
  * @return Fluent
  */
 public function toFluent()
 {
     return $this->connection->select('*')->from('(%SQL) t', $this->__toString());
 }
开发者ID:janlanger,项目名称:dibi,代码行数:8,代码来源:DataSource.php

示例3: getMemberships

 /**
  * Return the groups the given user is a member of
  *
  * @param   User    $user
  *
  * @return  array
  */
 public function getMemberships(User $user)
 {
     $userQuery = $this->ds->select()->from($this->userClass)->where($this->userNameAttribute, $user->getUsername())->setBase($this->userBaseDn)->setUsePagedResults(false);
     if ($this->userFilter) {
         $userQuery->where(new Expression($this->userFilter));
     }
     if (($userDn = $userQuery->fetchDn()) === null) {
         return array();
     }
     $groupQuery = $this->ds->select()->from($this->groupClass, array($this->groupNameAttribute))->where($this->groupMemberAttribute, $userDn)->setBase($this->groupBaseDn);
     if ($this->groupFilter) {
         $groupQuery->where(new Expression($this->groupFilter));
     }
     $groups = array();
     foreach ($groupQuery as $row) {
         $groups[] = $row->{$this->groupNameAttribute};
     }
     return $groups;
 }
开发者ID:hsanjuan,项目名称:icingaweb2,代码行数:26,代码来源:LdapUserGroupBackend.php

示例4: Connection

		<div class="content_section_data">
			<form name="frmspamdocremove"  method='POST'>
			
			<table align="left" class="comm_tbl ">
			
				<tr>
				<td align="left"> 
				<input type='hidden' name='action' value='untrain' />
			<?php 
echo TEXT_EDIT_SPAM_DOCUMENT_REMOVE_TEXT2;
?>
 :
			<select name='docid' class="comm_input input_width1a">
			<?php 
$con = new Connection($login, $pass, $server, $db);
$rs = $con->select("SELECT * FROM sptbl_spam_references");
while (!$rs->EOF()) {
    echo "<option value='" . $rs->f('id') . "'>" . $rs->f('id') . " - " . $rs->f('category_id') . "</option>\n";
    $rs->moveNext();
}
?>
			</select>
			</td><td align="left">
			<input type='submit' name='Submit' value='<?php 
echo TEXT_EDIT_SPAM_DOCUMENT_REMOVE;
?>
'  class="comm_btn" />
				
				</td>
				</tr>
			</table>
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:31,代码来源:editspamblock.php

示例5: getMemberships

 /**
  * Return the groups the given user is a member of
  *
  * @param   User    $user
  *
  * @return  array
  */
 public function getMemberships(User $user)
 {
     if ($this->groupClass === 'posixGroup') {
         // Posix group only uses simple user name
         $userDn = $user->getUsername();
     } else {
         // LDAP groups use the complete DN
         if (($userDn = $user->getAdditional('ldap_dn')) === null) {
             $userQuery = $this->ds->select()->from($this->userClass)->where($this->userNameAttribute, $user->getUsername())->setBase($this->userBaseDn)->setUsePagedResults(false);
             if ($this->userFilter) {
                 $userQuery->where(new Expression($this->userFilter));
             }
             if (($userDn = $userQuery->fetchDn()) === null) {
                 return array();
             }
         }
     }
     $groupQuery = $this->ds->select()->from($this->groupClass, array($this->groupNameAttribute))->where($this->groupMemberAttribute, $userDn)->setBase($this->groupBaseDn);
     if ($this->groupFilter) {
         $groupQuery->where(new Expression($this->groupFilter));
     }
     Logger::debug('Fetching groups for user %s using filter %s.', $user->getUsername(), $groupQuery->__toString());
     $groups = array();
     foreach ($groupQuery as $row) {
         $groups[] = $row->{$this->groupNameAttribute};
     }
     Logger::debug('Fetched %d groups: %s.', count($groups), join(', ', $groups));
     return $groups;
 }
开发者ID:AndHab,项目名称:icingaweb2,代码行数:36,代码来源:LdapUserGroupBackend.php


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