what is wrong with this wordpress update query?

admin

Administrator
Staff member
all

I am using wordpress update query function.

my code is

Code:
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 <strong>on</strong> then i want to update
Code:
wp_frm_items
table alerts field as 1 which row id is
Code:
$entry_id
.
This is not working for me, what is wrong here ?