First of all your code is unsafe. Need to add the sanitize functions and the escaping query to the database
global $wpdb; $tablename_temp = $wpdb->prefix . 'faculty_temp'; $toke = isset( $_GET['token'] ) ? sanitize_text_field( wp_unslash( $_GET['token'] ) ) : ''; $user = $wpdb->get_results("SELECT * FROM $tablename_temp where token='".$wpdb->esc_like($toke)."'");
The code is valid. Perhaps the problem is that you are simultaneously writing and deleting to the temporary table “faculty_temp” and the fetch request is sent when data is deleted or modified.
Need to change your method for working with temp data
Related Posts:
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- Column count doesn’t match value count at row 1
- Access denied for user ‘root@localhost’ (using password:NO)
- Access denied for user ‘root@localhost’ (using password:NO)
- How do I restore a dump file from mysqldump?
- #1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’
- How do I quickly rename a MySQL database (change schema name)?
- Authentication plugin ‘caching_sha2_password’ cannot be loaded
- Create a new database with MySQL Workbench
- How to get size of mysql database?
- 1052: Column ‘id’ in field list is ambiguous
- 1052: Column ‘id’ in field list is ambiguous
- difference between primary key and unique key
- How to create a foreign key in phpmyadmin
- importing a CSV into phpmyadmin
- How to check if mysql database exists
- Is there a Profiler equivalent for MySql?
- How to do a batch insert in MySQL
- MySQL: Cloning a MySQL database on the same MySql instance
- Error: Duplicate entry ‘0’ for key ‘PRIMARY’
- WordPress site migration – icons missing
- What’s a good strategy for planning WordPress DB growth?
- Split WP install between 2 databases?
- Universal problem: first request after ~25 second inactivity always slower (~1 second) than subsequent requests (~1/10sec)
- database optimization and server errors
- Why does changing Database Table Prefixes result in loss of content?
- Exporting completed webiste for another server
- Ubuntu 12.04, Nginx and MySQL issue with WordPress Database
- Data is not constatntly loading from custom wordpress table
- Mysql Server keeps crashing
- Changes not being reflected on new server
- Hang Up Followed By Can’t select database
- How do I load a sql.gz file to my database? (importing)
- ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
- String concatenation in MySQL
- MySQL server startup error ‘The server quit without updating PID file’
- SQL – Update multiple records in one query
- Column ‘user_id’ in field list is ambiguous
- Database sharding vs partitioning
- Escape string Python for MySQL
- how to overcome ERROR 1045 (28000): Access denied for user ‘ODBC’@’localhost’ (using password: NO) permanently
- SQL ZOO List each continent and the name of the country that comes first alphabetically
- Fatal error: Please read “Security” section of the manual to find out how to run mysqld as root
- ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘db’
- Access denied for user ‘root’@’localhost’ (using password: YES) after new installation on Ubuntu
- If variable equals value php [duplicate]
- Php – Your PHP installation appears to be missing the MySQL extension which is required by WordPress
- How to return number of found rows from SELECT query
- How to replace the domain name in a WordPress database?
- Reset Post IDs to less than 64bit integer
- Optimize WordPress Query that take 5 seconds to execute
- Does WordPress use the InnoDB engine for MySQL by default?
- Increment value (value = value+1) of $wpdb->update
- How can I debug my database connection for unit testing?
- Extending the database
- SQL query not working in alphabetical post title/content search
- Version upgrade: can my plugin filter the SQL statements issued during a database upgrade?
- Reset/Reorder posts ID in the MySQL wp_posts table
- Modify MySQL Query Based on Dropdown Menu
- WordPress Site Running Extremely Slow on Dedicated Server
- Select multiple wp_postmeta keys with single select
- WordPress not reflecting changed of the database
- How can I perform high-level database merging for WordPress within continues delivery?
- Backing up and restoring multiple sites efficiently
- Alter wp_post table vs. post_meta performance/speed
- Multiple instance of data in plugin custom database table on plugin activation
- How to prevent/delay MySQL connections when an object cache is used?
- Are these WordPress tables safe to add indexes to?
- SQL syntax error when getting data for a url
- Changing between Local Host DB to Production DB and in reverse
- Creating Database Table vs. Adding MetaData to Post & User
- Import CSV to MySQL, with custom registration field information
- Locally restoring a ManageWP full site backup
- WordPress doesn’t save changes some times
- Update Custom Post Type Taxonomies with SQL
- Query Column of Specific ID from Database Table
- Custom SELECT Query not returning the_title and the_permalink
- Export SQL query based on custom field?
- Cloning blog to localhost via WAMP
- my wordpress configuration locally vs live server
- Lock wait timeout exceeded; try restarting transaction
- PHP Warning: mysqli_query(): after updating my websites php from 5.6 to 7.2
- How to install WordPress from hosting service with mysql database from Compute Engine GCP?
- What is this? MySQL array?
- What is the MYSQL Query to bulk update the canonical URL of specific categories of posts in WordPress?
- Exporting Post ID, Post Title, Primary Category and Primary Category ID
- Use the loop to check if DB record exists?
- Add row to SQL array
- SELECT statement wrong?
- mysql query on wp_user and user_meta problem
- Use custom query if main search query returns zero results in wordpress
- Can I use mysql queries to replace query_posts()?
- How to Import Multiple Values in custom field
- Let users register weight each day and save it in DB
- Merging versions of wp_posts based on post_title
- How WP decide to show or not to show in admin panel the pop-up window with hint? Need a fix
- SQL – Pull products of particular category from a remote WordPress woocommerce db
- Efficiently loop over huge number of posts
- Using queries in and i see 7000+queries?