Create pull.php

All the unique sql commands for grabbing data from the DB