How-to show last 5 posts

global $wpdb, $post; // Uses current POST here
$IDs = $wpdb->get_col("SELECT `ID` FROM {$wpdb->posts}
    WHERE `post_type`='{$post->post_type}' AND `post_status`='publish' AND `ID`<{$post->ID}
    ORDER BY `ID` DESC LIMIT 5;");

This function lists the 5 posts with IDs lower then ID 176 that are of post_type="post" and post_status="publish". Change post_type if you use a custom post type to whatever you need. You can also order by post_date_gmt if you want.

Regards.

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