Try it like this:
$wpdb->get_var("SELECT COUNT(*) FROM $wpdb->usermeta WHERE `meta_key` = 'wp_ul_locked' AND `meta_value` = '1'");
Related Posts:
- How to properly insert data into custom table via plugin
- Searching users with WP_List_Table plugin
- How to write one comment and publish on every post using database or plugin?
- How to get number of Affected rows from wordpress dbDelta() function
- Display data on Word Press site posts and pages from mysql table
- How to simultaneously access the same MySQL database in the main column and sidebar of WordPress?
- WpDataTables – View Image Directory
- 306 MB of wp_options occupied by WordPress SEO Plugin, is that normal? [closed]
- pagination on data fetched using SQL query
- Notice: Uninitialized string offset: 0 in social sharing mu-plugin
- Using ‘mysqli_connect’ ‘crashes’ WordPress client-side
- How can I fetch data from another website to my wordpress website with mysql database
- speed up pagination for huge database
- Way to send multiple values for column to MySQL?
- How to display results from a data table with an encrypted user id?
- Check against server time to display SQL entries – Radio Station DJ Rotator Plugin
- add_action for publish_post doesn’t work
- WordPress Cache delete on plugin uninstall
- need to find duplicated meta value in custom filed and view the posts that have the same value
- Getting current user data with MySQL statement
- How to get the custom field value using SQL query
- WP Function does not trigger on Webhook API Call
- Cant create table on plugin activation
- How to get database connection details without longing to cpanel in WordPress?
- Moving a few select DB tables to a new WP instance
- How much PHP and MySQL or MariaDB knowledge should I know to start writing WordPress themes and plug-ins and whatever else a beginner can edit?
- get/show Last ID
- how to search through plugin in wordpress cimy-user-extra-fields?
- PHP Creating a formula from mysql db values and db stored math operator
- Split Million WordPress Post’s Into Multiple Database Server
- Getting 504 Gateway Timeout Error on AWS Server! [closed]
- WordPress issue – data is not showing in wp-admin, but when searching through database, all the data is there
- Creating 20,000 Posts or Pages using a .csv file?
- How to get the active theme’s slug?
- Bad Request (Invalid Hostname) on working server, database problem
- Errors while using ajax from external wordpress page
- shortcode doesn’t work
- Setting up widgets in wordpress with a unique ID for the after_title argument
- post expire after x days
- How to get all events from ‘All in one Events calender’ plugin in JSON format?
- cURL error 60: SSL certificate problem: unable to get local issuer certificate
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- Make specific products accessible only to a user role in WooCommerce
- Custom form action to handle data inside a plugin
- WP Post Template – Templates in own folder
- Apple push notification doesn’t work
- Override Plugin Script Fucnction in WordPress
- Conditional attributes and logic per product category
- Using Wishlist Member and I need to access a user’s status
- Subdomains with almost the same content
- WordPress page and plugin list using sql query
- Using window.onload with Ubermenu
- How to include this jQuery File in wordpress?
- Mass SQL WordPress Meta Key deletion
- dbDelta not adding additional columns in plugin database update
- Include a php file from another plugin
- Getting taxonomy images to display on single-post with their terms
- wp-mail attachment is not sent for no reason?
- Switch from wp-cron to a server cron job
- WordPress plugin: efficient way to store large data
- Theme Functions run a function upon activation or preview
- Is this plugin safe to run?
- Custom Plugin scripts from admin working in frontend
- Some error in mysql script ? Can’t working to create table
- I created a plugin with ‘view page’ that uses MYSQL + PHP. When I use wp_insert_post(), it turns everything to HTML
- get_post_meta shortcode returns empty field
- How to add a prefix to a WordPress post preview url?
- i can not access the post in custom template of my wordpress plugin
- How to get a specific string from a url
- WordPress rewrite rule depend on meta values not ids
- Easiest way to load/fire a handful of functions, IF checkbox is checked?
- How to avoid the 403 Forbidden error in a WP Plugin with Ajax and PHP
- Problem with wordpress has_action() function
- Offering a freemium plugin (a free version + paid version)
- How To Use htaccess to Rewrite Link Structure for a Page that is Generated Programatcially
- WordPress logout appends cache/all/index.php to the site_url()
- Change (replace) word in metabox
- WordPress environment not loading properly
- How to remove a css class for any wordpress page
- Creating wordpress admin page panel [Theme Option]
- Write mysql credentials in plugin
- export high ress images to pdf
- Autoloading a PHP class – working outside, but not inside WordPress plugin
- Calling an custom field from theme option at the frontend
- custom url with custom post
- Saving an array to get_options
- Variable passed to each() is not an array
- Linking Plugin Files to WP
- Replace Dash (-) and Underscore ( _ ) with Space
- How use Dynamic hyperlink on each wordpress post?
- How to execute init or woocommerce_init only for checkout page
- how to restore wordpress backup(.rar) manually?
- wordpress jquery is not defined because the head tag is empty
- Two sites one PC
- PHP if url extension action=discussion condition use [closed]
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Posts in Admin only display 1 Post instead of all Post in admin area
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- WordPress Throwing Deprecated Errors on its own Files
- plugin doesn’t retrieve data from database