Updating DB table error
-
I took this example right out of the codex and it works fine …
$wpdb->query( " UPDATE $wpdb->posts SET post_parent = 7 WHERE ID = 15 AND post_status = 'static' " );
I even modified it to this …
$wpdb->query( " UPDATE $wpdb->posts SET post_parent = 2 WHERE ID = 12 " );
BUT if I run the following adaptation I get an error and no update …
$wpdb->query("UPDATE $wpdb->bungeebones SET greeting = 2 WHERE id = 1 ");
bungeebones is the table name and wp_ is the prefix so I tried wp_bungeebones as well.I get the following error …
Error: [8] Undefined property: wpdb::$bungeebonesstring(38) “UPDATE SET greeting = 2 WHERE id = 1 ”
This is driving me nuts as the sample and my code look the same to me. I’ve looked and looked for some info on this ” Undefined property: wpdb::” error message but can’t find anything. Can someone help me please? What am I missing?
Thanks
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Updating DB table error’ is closed to new replies.