Parse error: syntax error, unexpected end of file

I just want to add to the two answers given on this matter. It is important to know that if you use

if($the_query->have_posts() ) :

you will need to close that with

endif;

otherwise you will also get the same parse error as described.

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