Offset posts with random order

Fetch all five posts in one query, store the result in a variable and take one each time you want to show an advertisement.

Now you cannot get duplicates, and more important: you save four queries.

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