Limit number of comments from get_comments()

I don’t usually work with comment so my suggestion is untested, but I see that get_comments() receives an array of args.

Try this:

$comments = get_comments(array("number" => 3))

and instead of your foreach loop:

foreach ($comments as $comment):

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