Hook to return true when the_post() is used in a custom while loop

if you use the native wp_query to select posts instead of custom sql queries you can check against the have_posts() method of wp_query

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