function ARC_api_helper::lock_tables in Taxonomy import/export via XML 5
Same name and namespace in other branches
- 5.2 arc/ARC_api_helper.php \ARC_api_helper::lock_tables()
- 6.2 arc/ARC_api_helper.php \ARC_api_helper::lock_tables()
- 6 arc/ARC_api_helper.php \ARC_api_helper::lock_tables()
File
- arc/
ARC_api_helper.php, line 254
Class
Code
function lock_tables($custom = "") {
if ($this->table_lock == "off") {
$tbls = $this
->get_tables();
$prefix = $this->config["prefix"];
$code = "";
foreach ($tbls as $cur_tbl) {
$code .= strlen($code) ? ", " : "LOCK TABLES ";
$code .= $prefix . "_" . $cur_tbl . " WRITE";
}
if (is_array($custom)) {
foreach ($custom as $cur_tbl) {
$code .= strlen($code) ? ", " : "LOCK TABLES ";
$code .= $cur_tbl . " WRITE";
}
}
$tmp = mysql_query("FLUSH TABLES");
$tmp = mysql_query($code);
$this->table_lock = "on";
}
}