$i = $j; } else { if ($i < $len - 2 && $str[$i] == "-" && $str[$i + 1] == "-" && FALSE !== strpos(" \t", $str[$i + 2])) { $j = strpos($str, "\n", $i + 3) or strpos($str, "\r", $i + 1); if (!$j) { break; } $i = $j; } else { if ($str[$i] == "\\") { ++$i; } } } } } } } } if (FALSE === $result && $curr_pos < $len) { $result = trim(substr($str_original, $curr_pos)); if (strncasecmp($result, 'delimiter', 9) == 0 && (strlen($result) == 9 || FALSE !== strpos(" \t", $result[9]))) { $delim = trim(strtolower(substr($result, 10))); if ("" == $delim) { $delim = ";"; } $match_pos = -1;
function ExecuteBatchQuery($mysql, $query) { WriteLog("Enter ExecuteBatchQuery"); $found = FALSE; $token = NULL; $prev = NULL; $token = my_strtok($query, $found); while (!empty($token)) { $prev = $token; $token = my_strtok($query, $found); if (empty($token)) { return ExecuteSingleQuery($mysql, $prev); } $result = mysql_query($prev, $mysql); if (!$result) { return HandleError(mysql_errno(), mysql_error()); } mysql_free_result($result); } WriteLog("Exit ExecuteBatchQuery"); return; }