You had not very good architecture for your application. Best way is in save user information in one table and use separated fields or linked table for save extra information.
In your case you case use UNION and check tables in one query.
And correct way is use SELECT COUNT(*)
and check result instead SELECT *
Related Posts:
- How to return number of found rows from SELECT query
- How do I make an HTML table from a database table?
- what is the use of /wp-includes/SimplePie?
- How to check if image is already stored in a site’s post database? (network)
- Inserting dynamic content into a page
- Check if post of title already exists
- How to export/import theme customizer settings?
- $wpdb->delete column values IN ARRAY()?
- Inserting choice in database table
- WP API V2 returning Invalid User ID
- How To Make Connection To WordPress Data Base In A Plugin?
- Has anyone tried putting PHP ActiveRecord on WordPress?
- Changing user_nicename
- Does WordPress cache get_user_meta() results?
- How to auto login user again after change user_login
- WordPress will not operate correctly
- Export User Info to CSV from Front End
- How to Join two tables from separate databases within WordPress
- WordPress admin never finishes saving page on site with large page count
- Retrieving and Displaying Data From a Table
- Refresh page after update_post_meta
- Search and Replace in database: How to replace data in SQL dump file on Windows?
- Duplicate domain database to local – How?
- error importing localhost export file to server
- Would manually deleting the dumping data fix a “#1062 – Duplicate entry ‘1’ for key ‘PRIMARY'” phpMyAdmin error?
- How to sort results from a custom database table
- How can I call a row of user specific data from a custom table added to the WP Database
- How to merge local and live databases?
- How to track a users progress through pages by inserting data into WordPress Database?
- Why WordPress uses 4 tables to manage terms
- Import 10,000 Users into WordPress WITH a specific ID for each user
- WPDB: how to get the value of a field in a custom database table
- WP database error for comments_popup_link()
- if statement on database query
- Notice: wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder
- Unusable menus and “Illegal widget setting ID: nav_menu_item[]” error
- No wp-config.php file on local install of wordpress – site still displays
- How to create Sub Sub domain Multi User blogs?
- How to find the output of contact form 7 shortcode? [closed]
- Issue with foreach on duplicate meta_key’s
- Access/update database with jQuery
- Front end/Database connection in WP
- I changed the password for the database user of my website, updated wp-config.php and wordpress asks to be reinstalled
- I want to use wordpress database in android app using json encode?
- Issue in url update when using wordpress update query
- direct query to post_meta table
- can’t delete a row from post_meta table
- Child theme functions.php file change database entries
- Accessing external database: ERR_INCOMPLETE_CHUNKED_ENCODING
- Can form entries from a WordPress form go to a database
- AJAX Not Working With WordPress Database properly
- special characters not supporting in wordpress
- How to set max users to 17.000
- Weird Behaviour: Not all WordPress Posts appearing
- Can not manually create a database ( db, user, pass ) for a plugin
- two wordpress sites, two themes, one database, same content
- Insert double entry in DB
- How to fetch results from database
- Manipulate database of WordPress site with my own scripts
- Unserializeing multiple column values that are stored in one database results variable
- Best way to define a database with product codes and back-end support?
- How to connect database table to each registered wordpress user.
- Problems with plugin that fetches data from database with ajax
- Check if values exists DB
- Querying multiple meta_keys in WordPress SQL query
- Let users register weight each day and save it in DB
- MySQL database migration to WordPress
- Host does not allow remote connection, so how do I transfer data to my WordPress site?
- Trying to post information from a remote database to wordpress page
- MySQL Engine vs. Charset
- Query specific posts per user selections from dropdown menus
- Custom query_posts() parameter
- Create an unique ID number after submit form
- How to print array of specific item
- Fetching wpdb data from a php file seems to break?
- How to pass username into form that sends data to database
- How to edit the default database of WordPress [closed]
- PHP Call to External Database
- Insert into db with foreach problem
- notify users when changed database
- Display total count of products in orders of a specific order status
- How do I empty a specific meta_value for all users in PHP
- save array of objects with update_option
- Create custom table for wordpress custom registration flow
- Execute multiple PHP Snippets causes error?
- Custom form that stores data in mysql database
- How to get data (not value or name) from radio options to POST to database
- Creating a table via dbDelta
- wpbd to connect to a VPS mysql database
- Retrieve data from external database and insert back in
- How to get the last date updated of postmeta?
- Putting form result in my database
- Bulk data save in custom table
- Can’t insert into a database wordpress
- Issue with WordPress Plugin Activation Hook and Table Creation
- WordPress Insert line in DB when clicking a button
- Updates applied to staging WordPress site affecting production even with different databases
- Failed PHP 8.0 Upgrade
- Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder
- How to improve the performance when using a flat-file dataset and PHP for implementing advanced search function?