Simple question Query get one :-)

Hi,
i am new in this forum. :slight_smile:
I have a simple question. First I have read the documentation. In fact, I’ve really created a simple APP as fast as possible. Really great:-).

I created a model. I would like to search for an entry in a table. I give a condition and expect results as an array at least key-value. With getOne I got only 1. Can anyone help me ?

$country = new Country($app->db);
$country->addCondition(‘iso’, ‘GER’);
$id_query_action = $country->action(‘select’)->getOne();

Thx a lot
BR
Peter

function getOne() return count result based on your condition
for getting data
$id_query_action = $country->action(‘select’)->export();
for selected field
$id_query_action = $country->action(‘select’)->export([‘id’,‘name’]);

hi ,

thx a lot for your rapid help :smile:

BR
Peter