lundi 2 mai 2016

Foreign key troubles , can`t create information in DB

I'm using laravel 5 + sql =) and when i want to create some information i have this message ->

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (danaparking.images, CONSTRAINT post_id_fk FOREIGN KEY (posts_id) REFERENCES posts (id) ON DELETE CASCADE ON UPDATE CASCADE) (SQL: insert into images (img_path, img_title, updated_at, created_at) values (/uploads/car.png, car, 2016-05-02 08:45:43, 2016-05-02 08:45:43))

where can be a problem?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire