How to use class wpdb?
-
I would like to use the functions (methods) defined in class wpdb in wp-db.php to store and read additional pieces of information in an extra table that I have created.
How does one go about it? My understanding of OOP is extremely minimal, and the naive approach that I used, namely using “$wpdb->query($Query);” in index.php results in an error message “Call to a member function on a non-object …”
$Query, for this test, was a simple INSERT INTO table (xxx) VALUES (yyy) that works without error through phpMyAdmin.
Tips and examples welcome!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to use class wpdb?’ is closed to new replies.