Update Query
-
Hi all,
I’m fairly new to WordPress, and have only been developing plugins for about a week now.
Overall it’s a very pleasant way of working and most things sort themselves out.
But one thing I can’t seem to get done, is updating a row in my DB tableI have tried lots of ways and searched a lot on the internet, but this is the best I can come up with, maybe i forgot something, or maybe some syntax that’s incorrect.
global $wpdb; $foobarOptie = $_POST["foobar"]; $deleteOptie = $_POST["DeleteData"]; $table = "wp_cool_plugin_options"; $data_array = array('idOptions' => 1, 'isFoobar' => $foobarOptie, 'DeleteData' => $deleteOptie); $where = "'idOptions' == 1"; $wpdb->update( $table, $data_array, $where );
Hopefully someone knows the solution, I’d be grateful 🙂
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Update Query’ is closed to new replies.