Hi all,
how to change from array to activedataprovider:
$connection = \Yii::$app->db;
$ratingQuery = $connection->createCommand('SELECT vorname, nachname, (
'.$radius.' * SQRT(2*(1-cos(RADIANS(lat)) *
cos('.$lat.') * (sin(RADIANS(lon)) *
sin('.$lon.') + cos(RADIANS(lon)) *
cos('.$lon.')) - sin(RADIANS(lat)) * sin('.$lat.')))) AS Distance
FROM ms_listing WHERE
'.$radius.' * SQRT(2*(1-cos(RADIANS(lat)) *
cos('.$lat.') * (sin(RADIANS(lon)) *
sin('.$lon.') + cos(RADIANS(lon)) *
cos('.$lon.')) - sin(RADIANS(lat)) * sin('.$lat.'))) <= '.$umkreis.'
ORDER BY Distance');
$rating = $ratingQuery->queryAll();
how can i pass the result to activedataprovider ? is it possible ?
Thanks once again