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)
- How to use mysqli_query() in PHP?
- Access Denied for User ‘root’@’localhost’ (using password: YES) – No Privileges?
- Access Denied for User ‘root’@’localhost’ (using password: YES) – No Privileges?
- ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
- ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
- MySQL string replace
- Cannot add or update a child row: a foreign key constraint fails
- ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
- String concatenation in MySQL
- What’s the difference between INNER JOIN, LEFT JOIN, RIGHT JOIN and FULL JOIN? [duplicate]
- Cannot add or update a child row: a foreign key constraint fails
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- MySQL Error “Operand should contain 1 column”
- Rename a table in MySQL
- getting error HTTP Status 405 – HTTP method GET is not supported by this URL but not used `get` ever?
- How to use MySQL DECIMAL?
- How should I tackle –secure-file-priv in MySQL?
- Can’t connect to local MySQL server through socket ‘/var/mysql/mysql.sock’ (38)
- How to make MySQL table primary key auto increment with some prefix
- MySQL ERROR 1290 (HY000) –secure-file-priv option
- MySQL error 2006: mysql server has gone away
- Which MySQL data type to use for storing boolean values
- sql query with multiple where statements
- ERROR 2003 (HY000): Can’t connect to MySQL server on localhost (10061)
- ERROR 1698 (28000): Access denied for user ‘root’@’localhost’
- Cannot delete or update a parent row: a foreign key constraint fails
- Cannot delete or update a parent row: a foreign key constraint fails
- ERROR 2003 (HY000): Can’t connect to MySQL server on localhost (10061)
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Case statement in MySQL
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- MySQL server startup error ‘The server quit without updating PID file’
- Rename a column in MySQL
- Can’t find mysqladmin on Mac OSX 10.6.8
- “INSERT IGNORE” vs “INSERT … ON DUPLICATE KEY UPDATE”
- Cannot delete or update a parent row: a foreign key constraint fails
- Export Pervasive to MySQL (C#)
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- MySQL server startup error ‘The server quit without updating PID file’
- Syntax error due to using a reserved word as a table or column name in MySQL
- ERROR 1698 (28000): Access denied for user ‘root’@’localhost’
- MySQL root password change
- Installation of MySQL for Visual Studio 1.2.8 failed
- Not unique table/alias
- How do I import an SQL file using the command line in MySQL?
- PHP Connection failed: SQLSTATE[HY000] [2002] Connection refused
- MySQL ERROR 1045 (28000): Access denied for user ‘bill’@’localhost’ (using password: YES)
- Your password does not satisfy the current policy requirements
- What does SQL Select symbol || mean?
- Install mysql-python (Windows)
- MySQL: Access denied for user ‘test’@’localhost’ (using password: YES) except root user
- PHP Connection failed: SQLSTATE[HY000] [2002] Connection refused
- SQL – Update multiple records in one query
- Mysql: Setup the format of DATETIME to ‘DD-MM-YYYY HH:MM:SS’ when creating a table
- What is the definition of cardinality in SQL
- How to restart remote MySQL server running on Ubuntu linux?
- MySQL DROP all tables, ignoring foreign keys
- #1055 – Expression of SELECT list is not in GROUP BY clause and contains nonaggregated column this is incompatible with sql_mode=only_full_group_by
- When to use SELECT … FOR UPDATE?
- Host ‘xxx.xx.xxx.xxx’ is not allowed to connect to this MySQL server
- Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
- Setting up foreign keys in phpMyAdmin?
- Select from multiple tables without a join?
- PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP
- ERROR 1396 (HY000): Operation CREATE USER failed for ‘jack’@’localhost’
- MySQL SELECT increment counter