There’s error in your query statement. Change to this
$post_id = $wpdb->get_var( "SELECT post_id FROM $customtable WHERE uniquecode="$uniquecode" AND blog_id = '$user_blog_id'" );
Related Posts:
- How to delete all records from or empty a custom database table?
- Is their any way to Extend WPDB class and Overwrite the Default Query Function
- Create a table with wordpress plugin boilerplate
- Custom table naming/access convention for multisite: $table_prefix vs base_prefix or other?
- plugin code is pulling information from database in one instance and not in other. What is wrong?
- Custom select query two tables by a meta key
- $wpdb->delete not working for me
- How to fix slow comment query?
- Plugin does not create a custom table upon activation
- Proper way to trigger a MySQL query via link in a plugin
- How to create specific wordpress Table
- Remove Duplicator plugin from admin menu if not an administrator
- Doubt using $wpbd->get_col for a single column
- Input with spaces in Shortcode attributes overwritten by defaults
- Access WordPress database outside of WordPress
- Add a custom form on the post-new.php admin page
- Removing customise fields during plugin uninstallation
- Correct way to perform non-cacheable DB query
- Edit Yoast SEO breadcrumbs output [closed]
- What’s the best way to implement AJAX in WordPress?
- How to Create a Custom Panel and Fields in Post Page [Plugin]
- Translating long texts with html formatting
- Help With MySQL to WPDB Query Conversion
- How would I go about creating a user ranked post popularity page?
- Anonymous Postings
- Do widget options need to be escaped widget()?
- Is there any W3C compatible Share & Follow plugin?
- Does any one have Idea to get these functionalities with the plugin wp-multi-network
- Creating mySQL procedure with $wpdb
- DROP TABLE with uninstall hook not working
- Problem with creating tables for Plugin
- Disable woocommerce cookies and delete cart data automatically
- className not populating in custom block
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- Run plugins only on certain pages
- Change commission_status paid when withdraw_status vendor is completed
- Overide plugin files from child theme (/inc/ ) folder
- wp_generate_attachment_metadata is creating an empty array
- custom payment gateway in woocommerce failed to connect to remote api server
- Display encrypted content on my website
- Post category with counts been display like a menu
- Post custom Data value in The Events Calendar plugin [closed]
- Send reply with pre-prepared answers
- Best way to maintain and update 3rd-party WP plugin when developer is unresponsive?
- WordPress plugin output formatting
- Save custom attributes of product in woocommerce
- Calling an attribute from a plugin shortcode
- Best place for short bio,image and button [closed]
- $wpdb->replace: WHERE?
- Use of Templates in a Plugin
- Why can’t I access my Intranet LDAPS with NADI?
- External Domain on WordPress Multisite
- In the archive widget, how do I sort in between two years?
- Customization API for plugin development
- $wpdb->get_row returns column name instead of column value
- Fromcraft Plugin On click submit button [closed]
- creating a custom shop page display on archive woocommerce
- Setup page on first login on multisite
- polylang + category/tag custom language link
- Anspress Customization: How to show logged in user votes on a single answer?
- Custom wordpress Theme and Plugin repository
- Automatic Updates Individual Plugins Not Working
- How do I make a child theme I made POST through a 3rd party plugin?
- WP Query. Is there a maximum size?
- Using $wpdb (WPDB class) ‘replace’ with multiple WHERE criteria problem
- How create Group Blogs based on user created Groups
- Multiple instance of data in plugin custom database table on plugin activation
- WordPress and a secondary database?
- How to redirect users to their profile after they successfully edit their profile
- Add ALT attribute to Pin It Button image to pass HTML5 validation
- date/time-picker and file upload (image) fields for custom fields (e.g. with more fields)
- Getting Theme element into plugins page editor in wp admin
- WordPress as web application base
- Customize The Events Calendar to Include an Option to Expand for More Events Listings
- URL rewrite of independent plugin?
- Plugin for users to create their own ads like Google Adsence
- GeoMashup plugin: how to customize cluster markers / icons? [closed]
- How do I apply style to each category of a list?
- Object method calling for global $wpdb in header.php
- Add category selection to custom post type (plugin)
- WooCommerce search products between price range using WP_Query
- Using wpdb without loading all plug-ins via wp-load.php
- Redirect to another page using contact form 7? [closed]
- changing posts layout in ultimate member profile plugin
- Can I create a table on my DB without creating a plugin?
- “No Add Button” for me to customize my WordPress with themes and pluggins
- Translation plugin to translate another plugins
- Login Customizer doesn’t change the background of the register form
- Inserting custom PHP script on homepage
- after wordpress update to 3.5+ i get many errors in plugin wpdb::prepare()
- Creating Featured Content Boxes
- How to insert multiple postmeta values with one query?
- Integrating WP E-commerce plugin into custom theme
- Best practice for including plugin output in a template without using shortcode?
- Custom post types – remove default post supports through empty array?
- Basic gallery plugin suggestion [closed]
- Cannot get wpdb data (Error in a simple fuction) [closed]
- WPDB: Update table
- Why Query is returning empty array?
- correct validate and sql query