find() public static method

This method accepts a variable number of arguments. If the table has a multi-column primary key, the number of arguments must be the same as the number of columns in the primary key. To find multiple rows in a table with a multi-column primary key, each argument must be an array with the same number of elements. The find() method always returns a array Row by primary key, return array Table::find(123); Row by compound primary key, return array Table::find([123, 'abc']); Multiple rows by primary key Table::find(123, 234, 345); Multiple rows by compound primary key Table::find([123, 'abc'], [234, 'def'], [345, 'ghi'])
public static find ( $keys ) : array
$keys The value(s) of the primary keys.
return array
Example #1
0
 /**
  * @dataProvider getFindWrongData
  * @expectedException Bluz\Db\Exception\InvalidPrimaryKeyException
  * @param $keyValues
  */
 public function testFindException($keyValues)
 {
     $this->table->find(...$keyValues);
 }