Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>After searching long and hard, and far and wide we've found a (what we think is the only) solution: create a function to loop through every one of these 'mini-queries' individually and it seems to be a lot more happy now! We actually came across this suggestion before but we rejected it initially because it would (and did) take a lot of time to separate 973 lines of code to split all the individual database additions...</p> <pre><code>$populate = " CREATE TEMPORARY TABLE IF NOT EXISTS `mldb`.`TempSchool` ( `CentreNo` INT UNSIGNED NOT NULL, `School` VARCHAR(255) NULL, `Street` VARCHAR(255) NULL, `Town` VARCHAR(255) NULL, `County` VARCHAR(255) NULL, `Postcode` VARCHAR(10) NULL, `Tel` VARCHAR(45) NULL, `URL` VARCHAR(512) NULL, `Email` VARCHAR(255) NULL, `Headteacher` VARCHAR(255) NULL, `LEA` VARCHAR(45) NULL, `LEANo` INT UNSIGNED NULL, `EstablishmentNo` INT UNSIGNED NULL, `URN` INT UNSIGNED NULL, `Governance` VARCHAR(45) NULL, `Phase` VARCHAR(45) NULL, PRIMARY KEY (`CentreNo`) ) ENGINE = InnoDB ; " ; populate ($dbc, $populate); $populate = " LOAD DATA INFILE '$path' IGNORE INTO TABLE `mldb`.`TempSchool` FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\\r\\n' IGNORE 1 LINES (@AdNo, @UPN, @ULN, @UCI, @CandidateNo, @LegalSurname, @LegalForename, @PreferredSurname, @PreferredForename, @Gender, @DOB, @Email, @InCare, @EverInCare, @FSM, @FSMEver6, @EAL, @SENStatus, @AMA, @Attendance, @RegGroup, @YearGroup, @EnteredYearDate, @Class, @Subject, @Staff, @Initials, CentreNo, School, Street, Town, County, Postcode, Tel, URL, Email, Headteacher, LEA, LEANo, EstablishmentNo, Governance, Phase) " ; populate ($dbc, $populate); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload