what is wrong with this wordpress update query?

all

I am using wordpress update query function.

Read More

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 ?

Related posts

Leave a Reply

2 comments