Database access: wpdb vs. native PHP
-
In my WordPress site I need to access some new tables that I’ve added to the WordPress MySQL database. I’ve been trying to use the wpdb functions, but I’m beginning to wonder why it’s better to use wpdb than just to use the native PHP functions for carrying out MySQL queries. I’m wondering why the wpdb functions were written, and whether they are just as complex and difficult to use as the PHP native functions, as well as possibly less powerful.
Can you tell me:
– why should I use wpdb functions rather than native PHP MySQL functions?
– will I get into trouble using native functions? What sort of trouble?
– is there anything I can do with wpdb that I can’t do with native functions?
– any other arguments for or against.Many thanks – Rowan
- The topic ‘Database access: wpdb vs. native PHP’ is closed to new replies.