get data with shortcode

I am not sure about your error as well, but one thing you are doing wrong. Returning data.

You should be ‘collecting’ them and then returning.

$data="";
foreach ( $results as $result )
{
    $data .= ' Point: '.$result.' ';
}

return $data;

Try this loop.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)