本文整理汇总了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";
}