Yii2 doesn’t use a persistent connection does it.
There are times when I like straight pdo with a little db class I use.
Something like:
public function getOne($catid)
{
$sql = "SELECT * FROM " . PREFIX . "cats WHERE catid = :catid";
$sth = DB::getPdo()->Prepare($sql);
$params = [':catid' => $catid];
$sth->execute($params);
return $sth->fetch(\PDO::FETCH_OBJ);
}
I am hoping there is not a persistent connection.