public function findWhere($where, $value)
    {
        $this->checkDb();
        $params = is_array($value) ? $value : [$value];
        $this->db->connect()
                 ->select()
                 ->from($this ->tableName)
                 ->where($where)
                 ->execute($params)
                 ->fetchInto($this);
    }
public function findWhere($where, $value)
    {
        $this->checkDb();
        $params = is_array($value) ? $value : [$value];
        $this->db->connect()
                 ->select()
                 ->from($this ->tableName)
                 ->where($where)
                 ->execute($params)
                 ->fetchInto($this);
    }
public function findWhere ( $ where , $ value ) { $ this -> checkDb ( ) ; $ params = is_array ( $ value ) ? $ value : [ $ value ] ; $ this -> db -> connect ( ) -> select ( ) -> from ( $ this -> tableName ) -> where ( $ where ) -> execute ( $ params ) -> fetchInto ( $ this ) ; }
Find and return first object found by search criteria and use
its data to populate this instance.

The search criteria `$where` of can be set up like this:
`id = ?`
`id1 = ? and id2 = ?`

The `$value` can be a single value or an array of values.

@param string $where to use in where statement.
@param mixed  $value to use in where statement.

@return this
Find and return first object found by search criteria and use its data to populate this instance .