/**
  * @see RedBean_Instance::find
  *      The findAll() method differs from the find() method in that it does
  *      not assume a WHERE-clause, so this is valid:
  *
  * $db->findAll('person',' ORDER BY name DESC ');
  *
  * Your SQL does not have to start with a valid WHERE-clause condition.
  *
  * @param string $type     type   the type of bean you are looking for
  * @param string $sql      sql    SQL query to find the desired bean, starting right after WHERE clause
  * @param array  $bindings values array of values to be bound to parameters in query
  *
  * @return array
  */
 public function findAll($type, $sql = NULL, $bindings = array())
 {
     return $this->finder->find($type, $sql, $bindings);
 }
Exemple #2
0
 /**
  * @see RedBean_Facade::find
  *      The findAll() method differs from the find() method in that it does
  *      not assume a WHERE-clause, so this is valid:
  *
  * R::findAll('person',' ORDER BY name DESC ');
  *
  * Your SQL does not have to start with a valid WHERE-clause condition.
  *
  * @param string $type     type   the type of bean you are looking for
  * @param string $sql      sql    SQL query to find the desired bean, starting right after WHERE clause
  * @param array  $bindings values array of values to be bound to parameters in query
  *
  * @return array
  */
 public static function findAll($type, $sql = NULL, $bindings = array())
 {
     return self::$finder->find($type, $sql, $bindings);
 }
Exemple #3
0
 /**
  * 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   type   the type of bean you are looking for
  * @param string $sql    sql    SQL query to find the desired bean, starting right after WHERE clause
  * @param array  $values values array of values to be bound to parameters in query
  *
  * @return array $beans  beans
  */
 public static function find($type, $sql = null, $values = array())
 {
     return self::$finder->find($type, $sql, $values);
 }