wpdb on a separate page
-
Anyone know how to update a value in the “posts” table of the WP database from a random page?
My form points to a page on submit and processes the data and I also want it to insert a new value into my posts table… not having much luck.
<?php $newvalue = $_GET["count"]; global $wpdb; $wpdb->update( $wpdb->posts, array( 'post_title' => $posttitle ), array( 'likecount' => $newvalue; ) ); ?>
Viewing 15 replies - 1 through 15 (of 15 total)
Viewing 15 replies - 1 through 15 (of 15 total)
- The topic ‘wpdb on a separate page’ is closed to new replies.