Look at the documentation, $wpdb->delete() takes at least two parameters, the table name and the Where-conditions as an array(). LIKE isn’t supported for delete imho, so you’ll need to use ->query
global $wpdb;
$wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key LIKE '_cb_%'" );
$wpdb->query( "DELETE FROM $wpdb->posts WHERE post_type LIKE 'webcam'" );
I assume the double closing parentheses and missing quotes were just from copy pasting?
Related Posts:
- How can I free up the memory used by update_post_meta?
- Insert, update or remove data from database (usermeta)
- WordPress how do I echo SUM from a column of a MySQL table by user id AND type_operation
- Objective Best Practices for Plugin Development? [closed]
- Should I use wpdb prepare?
- Post meta vs separate database tables
- How do i best handle custom plugin page actions?
- How to create an API for my plugin?
- Is it ever okay to include inline CSS in plugins?
- Plugins in symlinked directories?
- In Which Contexts are Plugins Responsible for Data Validation/Sanitization?
- Plugin Form Submission Best Practice
- Best way to abort plugin in case of insufficient PHP version?
- How can I configure Docker for developing and deploying a custom theme?
- What do you think about custom designed plugin/theme options UIs?
- No Error Log File, no debug info
- Where to put third party PHP library?
- Is the new WordPress 3.1 admin bar pluggable and how can I extend it?
- How to use PanelColorSettings in custom Gutenberg block?
- Getting a peer review for my new plugin?
- Optimize shortcode callbacks
- How to integrate a PHP webmail script into the backend of WordPress?
- Using filters and actions for plugin API?
- Is There A Hook To Process The Content Of The Text Widget?
- How to Change the Entire WordPress Admin panel Look and Feel?
- Getting wrong relationship value in $args in wp_Query?
- Does using set_transient() function can lead to MySQL problems?
- How to log plugin errors to plugin error_log file
- Which to use to execute code during the saving of a plugin settings page?
- Allowing for multiple template views on the Gallery Settings page when using the Visual Editor
- Using Primary Color in Plugin Block
- Save metabox with multiple checkbox array
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- How is the data stored in the database?
- When is it appropriate to put functions on page template vs. functions.php?
- Custom theme sufficient or custom plugin neccessary for this feature set?
- When to check if a function exists
- How to enable users to down-vote in this simple voting counter (that uses the post meta)?
- How to create custom home page via plugin?
- Adding callback function for wp_ajax_ has no effect
- Sessions not creating correctly in custom function
- Featured Image not showing in admin
- How to use wp_set_password in a plugin?
- Updating post meta for custom post types
- How Can I setup WP CLI on Windows development machine running AMPPS?
- WP_LOCALIZE_SCRIPT doesn’t work
- Nuance in adding CPT and TAX to a submenu
- Passing array of strings to a SQL statement in a WordPress plugin
- Can I differentiate between “Delete Post Permanently” and “Empty Trash” and do something for each accordingly?
- Is there a way to list tags order by post_meta field
- Activation hook not creating table
- Is the usage of ON DELETE CASCADE wrong or not allowed on wordpress?
- Delete a specific item menu when I deactivate my plugin
- How to edit mySQL wp_posts table from plugin php?
- Are we allowed to use the Allman (BSD) indent style when coding WordPress plugins and themes?
- Version upgrade: can my plugin filter the SQL statements issued during a database upgrade?
- Plugin development: get_post_meta is not working [closed]
- Ordering posts by metadata
- $wpdb -> Batch insert from XML File?
- Get the password key when using the wp_new_user_notification_email filter
- query users by role
- Order properties should not be accessed directly
- Act on user meta updated, but only once
- How to deal with equal & similar arguments for a function?
- Executing a function upon webhook calling wordpress
- How to check if Woocommerce Order number equals to post ID?
- Customizer: widget-synced triggers twice
- WordPress not working on localhost
- Adding functions to hooks from within a class
- how to use hook deleted_user into custom function to delete user from custom table
- Disable The Events Calendar plugin from loading its scripts
- Where to store the name of a custom table?
- Applying OO patterns and principles to plugin development
- WordPress is automatically linking plain text email addresses
- Is Using WordPress Supplied WYSIWYG Advisable?
- update post meta for checkbox in the admin when inserted in the front-end
- ServerSideRender and Media Object: attributes passing image data object to php renderer even though it’s not set
- 403 Error when text is pasted in Custom Metabox Textarea
- WordPress database error for query INSERT INTO
- How to connect to AWS RDS external database (not for the core WordPress db)
- Is it possible to change a term slug before being saved to the database?
- Maximum lifetime for nonce
- Clearing caches on plugin uninstall
- How to use a hook to override an update_post_meta call in a plugin?
- Add code inside specific wordpress standard function
- Custom Taxonomy to dropdown box on adminside wordpress
- Create a free scripts and styles template within a plugin
- Saving value of a selection option in comment form as comment meta
- Add a Save Button to Custom Meta Box [duplicate]
- How to modify the comments to be displayed in a post?
- Plugin with action ‘save_post’ needs to press publish twice on order to publish
- How can I turn a custom wordpress page into a product page?
- How can we display product price $104 on the cart while the credit card payment method is checked?
- Incorporate small angular feature in my wordpress site
- How to Bind one post object Type with other postobject Type in Advanced Custom field [closed]
- Doubts about the use of metadata and how this can affect performance on WordPress
- update_post_meta not working in a loop
- Run Shortcode of post’s custom field in functions.php / Plugin
- How to add user details to different tables immediately after user registration
- Search: how to extend the existing search to include a custom table