HOME > PHP > PHP Forum > ช่วยด้วยครับ กำลัง Forward Engineering กลับขึ้น ERROR: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your
ช่วยด้วยครับ กำลัง Forward Engineering กลับขึ้น ERROR: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your
Executing SQL script in server
ERROR: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '
CONSTRAINT `fk_subjects_conditionSubjects1`
FOREIGN KEY (`conSubNums`)
' at line 13
SQL Code:
-- -----------------------------------------------------
-- Table `education`.`subjects`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `education`.`subjects` (
`subIDs` VARCHAR(45) NOT NULL COMMENT 'รหัสวิชา',
`thaiName` VARCHAR(100) NOT NULL COMMENT 'ชื่อภาษาไทย',
`englishName` VARCHAR(100) NOT NULL COMMENT 'ชื่อภาษาอังกฤษ',
`conSubNums` VARCHAR(10) NOT NULL,
`creditLacture` INT(1) NOT NULL COMMENT 'หน่วยกิต ทฤษฎี',
`creditLab` INT(1) NOT NULL COMMENT 'หน่วยกิต ปฏิบัติ',
`ovetime` INT(1) NOT NULL COMMENT 'นอกเวลา',
PRIMARY KEY (`subIDs`),
INDEX `fk_subjects_conditionSubjects1_idx` (`conSubNums` ASC) VISIBLE,
CONSTRAINT `fk_subjects_conditionSubjects1`
FOREIGN KEY (`conSubNums`)
REFERENCES `education`.`conditionSubjects` (`conSubNum`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
COMMENT = 'วิชา'
SQL script execution finished: statements: 6 succeeded, 1 failed
Fetching back view definitions in final form.
Nothing to fetch