本文整理匯總了PHP中DBField::addToQuery方法的典型用法代碼示例。如果您正苦於以下問題:PHP DBField::addToQuery方法的具體用法?PHP DBField::addToQuery怎麽用?PHP DBField::addToQuery使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DBField
的用法示例。
在下文中一共展示了DBField::addToQuery方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: addToQuery
/**
*
* @param SQLQuery $query
*/
function addToQuery(&$query)
{
parent::addToQuery($query);
$query->selectField("AsText({$this->name})", "{$this->name}");
// $query->addSelect("AsText({$this->name}) AS {$this->name}_AsText");
// $query->select[] = "AsText({$this->name}) AS {$this->name}_AsText";
}
示例2: addToQuery
public function addToQuery(&$query)
{
parent::addToQuery($query);
$fields = $this->compositeDatabaseFields();
foreach ($fields as $name => $type) {
$query->selectField($this->name . $name);
}
}
示例3: addToQuery
public function addToQuery(&$query)
{
parent::addToQuery($query);
$query->selectField(sprintf('"%sPostcode"', $this->name));
$query->selectField(sprintf('"%sCountry"', $this->name));
$query->selectField(sprintf('"%sLatitude"', $this->name));
$query->selectField(sprintf('"%sLongditude"', $this->name));
}
示例4: addToQuery
/**
* Add all columns which are defined through {@link requireField()}
* and {@link $composite_db}, or any additional SQL that is required
* to get to these columns. Will mostly just write to the {@link SQLSelect->select}
* array.
*
* @param SQLSelect $query
*/
public function addToQuery(&$query)
{
parent::addToQuery($query);
foreach ($this->compositeDatabaseFields() as $field => $spec) {
$table = $this->getTable();
$key = $this->getName() . $field;
if ($table) {
$query->selectField("\"{$table}\".\"{$key}\"");
} else {
$query->selectField("\"{$key}\"");
}
}
}
示例5: addToQuery
public function addToQuery(&$query)
{
parent::addToQuery($query);
$query->selectField(sprintf('"%sAmount"', $this->name));
$query->selectField(sprintf('"%sCurrency"', $this->name));
}
示例6: addToQuery
/**
* Add all columns which are defined through {@link requireField()}
* and {@link $composite_db}, or any additional SQL that is required
* to get to these columns. Will mostly just write to the {@link SQLQuery->select}
* array.
*
* @param SQLQuery $query
*/
public function addToQuery(&$query)
{
parent::addToQuery($query);
}
示例7: addToQuery
function addToQuery(&$query)
{
parent::addToQuery($query);
$name = sprintf('%sValue', $this->name);
$val = sprintf('"%sValue"', $this->name);
$select = $query->getSelect();
if (!isset($select[$name])) {
$query->addSelect(array($name => $val));
}
}
示例8: addToQuery
function addToQuery(&$query)
{
parent::addToQuery($query);
$query->select[] = "AsText({$this->name}) AS {$this->name}_AsText";
}