src/Db/MySqlDb.php
public function load($tablename, $rows, array $options = []) {
        $count = 0;
        $first = true;
        $spec = [];
        $stmt = null;

        // Loop over the rows and insert them with the statement.
        foreach ($rows as $row) {
            if ($first) {
                // Build the insert statement from the first row.
                foreach ($row as $key => $value) {
                    $spec[$key] = $this->paramName($key);
                }

                $sql = $this->buildInsert($tablename, $spec, false, $options);
                $stmt = $this->pdo()->prepare($sql);
                $first = false;
            }

            $params = array_translate($row, $spec);
            $stmt->execute($params);
            $count += $stmt->rowCount();
        }

        return $count;
    }
public function load($tablename, $rows, array $options = []) {
        $count = 0;
        $first = true;
        $spec = [];
        $stmt = null;

        // Loop over the rows and insert them with the statement.
        foreach ($rows as $row) {
            if ($first) {
                // Build the insert statement from the first row.
                foreach ($row as $key => $value) {
                    $spec[$key] = $this->paramName($key);
                }

                $sql = $this->buildInsert($tablename, $spec, false, $options);
                $stmt = $this->pdo()->prepare($sql);
                $first = false;
            }

            $params = array_translate($row, $spec);
            $stmt->execute($params);
            $count += $stmt->rowCount();
        }

        return $count;
    }
{@inheritdoc}