Completely changed to fit $wpdb
Progress on paypal