Getting this error "Commands out of sync; you can't run this command now"
Here is the code
$sql = file_get_contents("setup.sql");
$sql = str_replace(["WEBSITE_URL", "LICENSE_KEY", "WEBSITE_TITLE"], [rtrim($website->website_url, "/"), $website->license, empty($website->w_title) ? "'Script By JUICYCODES.COM'" : "'" . $website->w_title . "'"], $sql);
if ($db->multi_query($sql)) {
do {
$query = $db->use_result();
} while (!$db->next_result());
}
Can Anyone solve the issue?