how to query entries from database in your website