Hello, everyone. I've recently switched hosts and the same script I was running in the past is now causing the rest of my MySQL queries to be locked, and it seems the query never completes.
The code is:
<?
$con = mysqli_connect('localhost','user','password', 'database');
$Q = "DELETE FROM `Table1` WHERE `Field1` IN (SELECT `Field2` FROM `Table2`)";
if(mysqli_query($con,$Q)){
echo 'entries deleted from table1';
}else{
echo 'delete failed: '.mysqli_error($con);
}
?>
The code is used to delete entries from a table if they exist in another table. I've researched the problem and tried every solution I could find. I've changed my MySQL settings and reset the SQL server several times without any luck. I am running a VPS with 2 gigabytes of RAM and plenty of processing power.
If anyone has any suggestions or knows another method, I'd love to hear it.
Thanks for taking the time to read this,
Resentful