More file Structure and change

Now ,I need to query the database but not sure how at the moment.