$wpdb->query()
doesn’t return the data but the rows affected, use $wpdb->get_var()
.
Related Posts:
- Should I use wpdb prepare?
- How to add multiple custom URL variables?
- Getting wrong relationship value in $args in wp_Query?
- Does using set_transient() function can lead to MySQL problems?
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- How is the data stored in the database?
- Use of global variables within plugin [closed]
- How can I free up the memory used by update_post_meta?
- Passing array of strings to a SQL statement in a WordPress plugin
- Activation hook not creating table
- Is the usage of ON DELETE CASCADE wrong or not allowed on wordpress?
- How to edit mySQL wp_posts table from plugin php?
- Version upgrade: can my plugin filter the SQL statements issued during a database upgrade?
- $wpdb -> Batch insert from XML File?
- query users by role
- Can wp_list_comments output into variable?
- WordPress database error for query INSERT INTO
- How to connect to AWS RDS external database (not for the core WordPress db)
- How to fix Uninitialized string offset: error on a checkbox in WP Settings API
- Append varible to url or set session
- How to add user details to different tables immediately after user registration
- mysql_real_escape_string() vs. esc_sql() in WordPress
- How to get all queries’s results after they have executed?
- $wpdb->prepare with LIKE and sprintf
- Alternative functions for mysql_free_result and mysql_ping in wordpress functions
- Using AND and bracket grouping in SQL not working
- Two different wordpress sites – same server and IP address. Gaining Access to database 1 of 2
- Custom Post Type Object – Undefined Variables
- Auto-complete or auto-suggest from stored data in database
- What might be the reason of Couldn’t fetch mysqli_result on another domain?
- $wpdb->prepare is not working like mysql_real_escape_string
- Brainstorm – Slow Query from Plugin Need to Speed It Up
- Create an user on external database
- What could cause a WP Option to get truncated?
- WordPress database error: [Query was empty] – using $wpdb->prepare()
- Foreign wp_users ID in custom plugin DB table?
- How to Get Last ID?
- Insert, update or remove data from database (usermeta)
- how to create a shortcode from a variable in plugin
- WordPress how do I echo SUM from a column of a MySQL table by user id AND type_operation
- Why is that only the first row getting inserted into Mysql table when i import csv file on backend custom plugin?
- Error Connecting to Database WHEN Installing WordPress on XAMPP [Tried All the Usual Stuff] (Pics Included)
- Is it possible to replace MySQL with JSON files for WordPress
- WordPress doesn’t create table on plugin activation
- WordPress delete mysql rows with string
- Organising and completing posts (mark as read and hide)
- pull data from wordpress database
- Plugin MySQL SELECT custom data and filter on user meta
- sql query not working in wp plugin
- $wpdb Mysql trigger problem
- Custom MySQL query to pull out Advanced Custom Fields?
- How to filter get_adjacent_post()?
- $wpdb how can i save my postmeta table before querying it
- How can I see a varibles value when my plugin runs?
- How to add chunk of php, html, and sql code to variable an append to $content
- Nothing happens on WordPress Update command
- What is the difference between $post_id and get_the_ID()?
- Where to store plugin settings fields
- How can I add columns to the post edit listing to show my custom post data?
- What’s the best method for emptying an option created with the Settings API?
- template_include (overriding default plugin templates via current theme)
- Update exisiting site to 3.5 release candidate
- Why does do_action pass a blank string as the first parameter if no $arg is set?
- How to get shortcode to work inside a foreach loop called within a shortcode?
- How to bundle a plugin with a theme, or vice versa
- WordPress Media mime type filter problem 4.0
- Use theme constants in plugin?
- How to avoid creating first submenu page that is same as menu page?
- How can I display an error message after post has been saved?
- What method to use to call a REST API?
- GET parameters interfere with my plugin settings
- What’s the best place to hire a freelance (contract) WordPress developer? [closed]
- How to add plugin version update option in plugin row action?
- wp_filesystem put_contents issue with owner/group
- Widget options are not updated
- Gutenberg table block with Bootstrap .table class
- Translate MCE button text/tooltip in custom plugin
- Do blocks replace plugins in WordPress 5?
- Show dynamic list of products from custom api of another database under same host
- Hide custom post type by user roles
- Odd map_meta_cap $args on post edit — sometimes integer, sometimes string
- How can I create a custom plugin that allows anonymous users to signup without registering?
- How to call a function using a shortcode [closed]
- How to add template colors to custom block options in WordPress Gutenberg editor sidebar?
- WP: Search and replace in DB programmatically
- How to silent ‘Attempting a database schema change is discouraged.’?
- Plugin Development – Get Admin Url (Including cases where wp-admin is not used)
- Add code to template dynamically
- Creating posts with links from a txt file
- Detect if requested page is PWA on server side
- Redirection from a specific page for users logged in but not with membership
- Allow user to add the php code in wp_mail()
- Hiding WordPress REST endpoints from public viewing using Basic Authentication
- Plugin setting page – update_option problem
- WordPress Plugin Update Process
- Registration form Plugin… Email confirmation
- How to display posts list on my plugin page?
- Can’t add images in wordpress to my page – button isn’t clickable
- Gutenberg and custom blocks messed up pagespeed score. What did I wrong?
- Generating Multiple Divi Pages from Database