mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merge pull request #7521 from ravage84/2.7-field-return-value
Add false as return value of field()
This commit is contained in:
commit
f50efd7595
2 changed files with 9 additions and 9 deletions
|
@ -739,9 +739,9 @@ class DboSource extends DataSource {
|
||||||
/**
|
/**
|
||||||
* Returns a single field of the first of query results for a given SQL query, or false if empty.
|
* Returns a single field of the first of query results for a given SQL query, or false if empty.
|
||||||
*
|
*
|
||||||
* @param string $name Name of the field
|
* @param string $name The name of the field to get.
|
||||||
* @param string $sql SQL query
|
* @param string $sql The SQL query.
|
||||||
* @return mixed Value of field read.
|
* @return mixed Value of field read, or false if not found.
|
||||||
*/
|
*/
|
||||||
public function field($name, $sql) {
|
public function field($name, $sql) {
|
||||||
$data = $this->fetchRow($sql);
|
$data = $this->fetchRow($sql);
|
||||||
|
|
|
@ -1636,13 +1636,13 @@ class Model extends Object implements CakeEventListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the contents of a single field given the supplied conditions, in the
|
* Returns the content of a single field given the supplied conditions,
|
||||||
* supplied order.
|
* of the first record in the supplied order.
|
||||||
*
|
*
|
||||||
* @param string $name Name of field to get
|
* @param string $name The name of the field to get.
|
||||||
* @param array $conditions SQL conditions (defaults to NULL)
|
* @param array $conditions SQL conditions (defaults to NULL).
|
||||||
* @param string $order SQL ORDER BY fragment
|
* @param string $order SQL ORDER BY fragment.
|
||||||
* @return string field contents, or false if not found
|
* @return string|false Field content, or false if not found.
|
||||||
* @link http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#model-field
|
* @link http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#model-field
|
||||||
*/
|
*/
|
||||||
public function field($name, $conditions = null, $order = null) {
|
public function field($name, $conditions = null, $order = null) {
|
||||||
|
|
Loading…
Reference in a new issue