izniburak/pdox

a useful new function

shaobingme opened this issue · 2 comments

Suggest to add a new function
public function getValue($name) { $query = $this->get(); return isset($query[$name])?$query[$name]:false; }

Hi @shaobingme ,
Thanks for your suggestion. We might think to add that functionality in next release. I note that.

Thanks.

I made a slight change:

public function getValue(string $field) 
{ 
        $query = $this->select($field)->get('array');
        return $query[$field] ?? null;
 }