Craft 3: Get Data from a custom Table via createCommand() In Craft 2 you could creat a query with:

craft()-&gt;db-&gt;createCommand()-&gt;select() .... etc.

But in Craft 3 there is no select() Method in Craft::$app-&gt;db-&gt;createCommand().

Am I overlooking something?
You can use either an activeRecord  for it 

$customer = Customer::find() 
    -&gt;where(['id' =&gt; 123]) 
    -&gt;one();


Or a query 

$rows = (new \craft\db\Query()) 
    -&gt;select(['id', 'email']) 
    -&gt;from('user') 
    -&gt;where(['last_name' =&gt; 'Smith']) 
    -&gt;limit(10)
     -&gt;all();