Remove mysql functions

Use wpdb instead!