findLast() public method

Opposite of Finder::findLast(). If no beans are found, this method will return NULL.
See also: Finder::find
public findLast ( string $type, string $sql = NULL, array $bindings = [] ) : redbeanphp\OODBBean
$type string the type of bean you are looking for
$sql string SQL query to find the desired bean, starting right after WHERE clause
$bindings array values array of values to be bound to parameters in query
return redbeanphp\OODBBean
Exemplo n.º 1
0
 /**
  * @see Facade::find
  * This variation returns the last bean only.
  *
  * @param string $type     the type of bean you are looking for
  * @param string $sql      SQL query to find the desired bean, starting right after WHERE clause
  * @param array  $bindings array of values to be bound to parameters in query
  *
  * @return OODBBean
  */
 public static function findLast($type, $sql = NULL, $bindings = array())
 {
     return self::$finder->findLast($type, $sql, $bindings);
 }