How to run select query of post with category and tags?

1) Blank page in WordPress means, there is a fatal PHP error in your code. Also the or die() statement could cause the white page. You should not use or die() in production code, instead use try .. catch

2) Besides this I strongly discourage you from using mysqli_* functions in WordPress. Always use $wpdb for DB access!

3) Your query has some issues, but those will not cause the blank page but possibly incorrect results.

4) In this case you possibly want to use core WP functions instead. Like get_posts() and get_the_category()