當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Finder::where方法代碼示例

本文整理匯總了PHP中Finder::where方法的典型用法代碼示例。如果您正苦於以下問題:PHP Finder::where方法的具體用法?PHP Finder::where怎麽用?PHP Finder::where使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Finder的用法示例。


在下文中一共展示了Finder::where方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: catch

} catch (Exception $e) {
}
asrt(in_array("hack", $adapter->getCol("show tables")), true);
$bean->{$evil} = 1;
try {
    $redbean->store($bean);
} catch (Exception $e) {
}
asrt(in_array("hack", $adapter->getCol("show tables")), true);
try {
    $redbean->trash($bean);
} catch (Exception $e) {
}
asrt(in_array("hack", $adapter->getCol("show tables")), true);
try {
    Finder::where("::");
} catch (Exception $e) {
    pass();
}
$adapter->exec("drop table if exists sometable");
testpack("Test RedBean Security - query writer");
try {
    $writer->createTable("sometable` ( `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT , PRIMARY KEY ( `id` ) ) ENGINE = InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ; drop table hack; --");
} catch (Exception $e) {
}
asrt(in_array("hack", $adapter->getCol("show tables")), true);
//print_r( $adapter->get("select id from page where id = 1; drop table hack") );
//asrt(in_array("hack",$adapter->getCol("show tables")),true);
//$bean = $redbean->load("page","13);show tables; ");
//exit;
testpack("Test ANSI92 issue in clearrelations");
開發者ID:blocka,項目名稱:redbean,代碼行數:31,代碼來源:test.php

示例2: findAndExport

 /**
  * Finds a bean using a type and a where clause (SQL).
  * As with most Query tools in RedBean you can provide values to
  * be inserted in the SQL statement by populating the value
  * array parameter; you can either use the question mark notation
  * or the slot-notation (:keyname).
  * The variation also exports the beans (i.e. it returns arrays).
  * @param string $type
  * @param string $sql
  * @param array $values
  * @return array $arrays
  */
 public static function findAndExport($type, $sql = "1", $values = array())
 {
     $items = Finder::where($type, $sql, $values);
     $arr = array();
     foreach ($items as $key => $item) {
         $arr[$key] = $item->export();
     }
     return $arr;
 }
開發者ID:nev3rm0re,項目名稱:hondex,代碼行數:21,代碼來源:rb127lg.php

示例3: find

 /**
  * Finds a bean using a type and a where clause (SQL).
  * As with most Query tools in RedBean you can provide values to
  * be inserted in the SQL statement by populating the value
  * array parameter; you can either use the question mark notation
  * or the slot-notation (:keyname).
  * @param string $type
  * @param string $where
  * @param array $values
  * @return array $beans
  */
 public static function find($type, $where = "1", $values = array())
 {
     return Finder::where($type, $where, $values);
 }
開發者ID:u007,項目名稱:FlexiPHP,代碼行數:15,代碼來源:rb.php


注:本文中的Finder::where方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。