why foreign key doesn't work in websql..?
问题 i try to use foreign key in my app using web sql.. i test it in chrome.. no error.. but when i test with manual insert to table img (contain FK) i expect to fail.. but insert is still succes.. this is my code.. please help me.. tx.executeSql("PRAGMA foreign_keys = ON;"); tx.executeSql("CREATE TABLE IF NOT EXISTS img (ID INTEGER PRIMARY KEY ASC,imgID VARCHAR, image VARCHAR, FOREIGN KEY (imgID) REFERENCES trans (ID) )", []); i this case i try to use FK method for save my image name data and