all
I am using wordpress update query function.
my code is
if($_GET['action'] == 'on')
{
$form_id = $_GET['form'];
$entry_id = $_GET['id'];
global $wpdb;
$wpdb->query(
"
UPDATE $wpdb->wp_frm_items
SET alerts = 1
WHERE id = $entry_id
"
);
}
So what i want to do is if i get action as on then i want to update wp_frm_items
table alerts field as 1 which row id is $entry_id
.
This is not working for me, what is wrong here ?
This works
(source:WordPress update mysql table
)
Example:
change user’s Nicename and ID
Learn more at:
http://codex.wordpress.org/Class_Reference/wpdb#Examples