26.02.2013, 15:53
I was creating a vehicle system..i had a problem..they said i should create a foreign key..i did.Not i can not write anything into my table and this is the error im getting:
pawn Код:
[17:12:39] CMySQLHandler::Query(INSERT INTO vehicles (vehicleid,owner,model,x,y,z,r,LPlate,EngineHealth,CColor1,CColor2) VALUES (NULL,'Enrico_Mancini',411,-164.632904,1011.897399,19.617200,92.183296,'ZPF 606',1000,212,88)) - An error has occured. (Error ID: 1452, Cannot add or update a child row: a foreign key constraint fails (`bebras`.`vehicles`, CONSTRAINT `vehicles_ibfk_1` FOREIGN KEY (`vehicleid`) REFERENCES `users` (`userid`) ON DELETE CASCADE ON UPDATE CASCADE))