I have following task to do (I have 0 magento experience, and I am told to do this):
Make standalone script that reads every order from Magento, and filter those that have purchased this product id => 297. Then write the customer and order information into a csv file on the server.
I know how to make CVS file, but I don't know how to work with magento. How can I do this?