Using AJAX in wordpress theme
You need to add the $where parameter to your update statement because it doesn’t know which row to update. The $wpdb->update() method has no default value for the $where argument so you must supply one. http://codex.wordpress.org/Class_Reference/wpdb#UPDATE_rows Try this: $wpdb->update( $wpdb->wp_frm_items, array( ‘alerts’ => 1), array( ‘user’ => get_current_user_id() ) );