This plugin replaces how WordPress handles database calls. You should always use the “wpdb” class WordPress provides and never make the connection yourself.
OK then, where do I tell WordPress to use this database with username and password?
I just don’t understand where to write my SQL statements in my pages…
Interesting!
Then what do I write on a WP page to access DB data? I wanna insert into a table, what do I write?
All right, I’ll read that.
In fact, what I want to do, is a command form on a WP page. In normal PHP, I would call my DB with PDO. But since I’m in WP, that’s why I’m so lost.
How would you do an insert in table with that plugin enabled?
First of all this plugin doesn’t make it easier/harder to insert something in a table. It’s code you should not touch expect that it will run for you.
First start with creating a shortcode or page template to display the form. See for the page templates: http://codex.wordpress.org/Page_Templates.
When you want to insert data into a custom database table then you do the following:
$wpdb->insert(
'wp_mytable',
array(
'column1' => 'value1',
'column2' => 123
),
array(
'%s',
'%d'
)
);