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() )
);
Related Posts:
- Does the functions.php file ever get called during an AJAX call? Debug AJAX
- How bad is it if I write AJAX functions using wp-load.php?
- redirect does not work in ajax function
- Add a preview to a WordPress Control Panel
- Changing the entire control choices using wp.customize with JavaScript
- Can’t access WordPress functions in file called via Ajax?
- How WordPress converts URL to $query_string
- How to Globally Use wp_localize_script() Ajax URL
- trying to use wp_handle_upload with ajax
- Using an if statement in the theme customizer page
- Retrieve localised value
- AJAXIFY WordPress Theme Frontend menu
- Post thumbnail to append post content via ajax click event
- Would to use AJAX to get an option from the database and use it in a jquery setup or is there an alternative to consider?
- ajax response -1 in wordpress theme
- Why does admin-ajax load slow and what are ways to speed it up?
- Why WordPress AJAX returns undefined however it works fine when I add static url instead of dynamic function?
- How to use ajax in wordpress and sending the data without refreshing ?
- Issue on Accessing To Ajax Enqeued File to Pass to URL for Ajax Call
- pass wordpress template directory into ajax url call
- Ajax call returns 0 when add_action is inside a class in functions.php
- Retrieve WordPress’ the_content() with jQuery
- AJAX call fails when sending JSON but works with URL style string
- Pagination don’t work with active filters
- Woocommerce AJAX filters option loading spiner – problem on mobile device
- how use ajax to custom page template
- How to properly use AWS SES for a contact form?
- WordPress Insert ads after every 5th post
- Why excerpt hook not working inside ajax function?
- Theme functions don’t work as expected in partial included via get_template_part() after custom query using Ajax [duplicate]
- How to load jQuery with Ajax in WP version 5.3.2?
- Ajax Comment Upvotes – Votes don’t always register
- use a single nonce in three different nonce field
- Infinite scroll without plugin using ajax
- my ajax wont sent the data, please correct my code
- wp_kses allow checkbox class and checked
- WordPress Ajax Spitting out a page as a response?
- Using Customizer value in an external PHP file inside a theme
- How to avoid Ajax in wordpress theme in making mulitple request?
- Allow access to stand-alone php file WordPress
- Which function(s) to build a paged HTML table
- How to create .pot files with POedit?
- How do I get the theme URL in PHP?
- Why when I submit a form in wordpress it loads a 404 page though URL is correct
- What is the constant WP_USE_THEMES for?
- Any alternate TinyMCE4 themes / subthemes?
- wp_get_attachment_image_attributes not working for me
- add_editor_style not working
- Add colors to existing color palette without replacing it
- How can I include a post in a theme?
- Custom CSS In Uploads Folder
- How to write .htaccess dynamically? [closed]
- Adding wp_enqueue_media(); causes problem
- A guide or tool for inserting bootstrap in underscores theme? [closed]
- What is the correct way to do a mobile theme for WordPress?
- What is the right way to make custom main page?
- .sub-menu or .children?
- Custom CSS without css.php file
- Script only partially runs on theme activation, but runs fully on deactivation?
- How to echo category_description() without stripping out html tags?
- How to add infinite scroll?
- How can I have a page on a site that isn’t a ‘Page’ in the WordPress sense?
- get_option in header.php not returning value from customizer
- Show notice just below the search form on the themes page
- How do I build a post_thumbnail based archive? [closed]
- Single translation for many locales
- Is accessing theme and using customizer GPL distribution?
- WordPress 500 Internal server error when activating custom theme [closed]
- Wpautop in wp_editor not working
- Comment status shows ‘closed’ in db, but it shows ‘open’ when i echo it
- I used single quote to design HTML of my WordPress blog. Now site redirects to index.php everytime than page.php or single.php
- Is there any way to register custom background images like header images?
- html5-reset theme does not show the image [closed]
- WordPress HTML5 Gallery Support – Convert HTML4 -> HTML5
- Issue On Displaying Pages with Post Name Permalink
- How to make javascript work on theme options page
- Contact Form Security
- Where do you add code in custom fuctions so it works on a specific page?
- WordPress: Allowed Memory Size Exhausted – After Moving from Dev to Live [closed]
- What exactly is “wordpress theming”? [closed]
- Present Color Schemes to Clients
- GrandParent ,Parent, Child issue
- Unable to add widgets to sidebars in custom theme
- View list of all attachments on site
- How do I display a greyed out next_post_link when there is no next post
- What is the difference between Twenty eleven & roots framework?
- How to Modify WP_Includes/blocks/latest_posts.php
- Adding popup support to the theme
- Page For Specific Posts
- How to reduce the vertical space above and below a ul list uniformly with one command?
- How can I show a custom WordPress menu anywhere I want on my website?
- How to know and change the machine name of a menu?
- How does mediaelement.js work in WordPress?
- Images use & location, on new wordpress theme
- WordPress Theme Developments – Start from another theme
- Access meta box checked value in another file
- Slider should be display in home template [closed]
- How does offset works on pagination? (get_results)
- How to Create a Multi Purpose Theme?
- How to send async emails in wordpress?