Skip to content
Advertisement

Tag: database

Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row:

during the realization of a project I encountered this problem can you help me please Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (bdd_sql.publications, CONSTRAINT publications_ibfk_1 FOREIGN KEY (auteur) REFERENCES utilisateurs (id) ON DELETE CASCADE ON UPDATE CASCADE) in C:xampphtdocsmini_projetclass.php:107 Stack trace: #0 C:xampphtdocsmini_projetclass.php(107): PDO->query(‘INSERT INTO pub…’)

How to cache BLOB type in Laravel

Hi everyone, Is there a way to cache BLOB types temporarily in Laravel ? Scenario: I’m gonna cache some data MEDIUMBLOB with the size of 2048KB temporarily. These data are actually parts of a large single file 16MB. After caching all parts, they will be combined together into a single file, then will be removed from cache. The content of

How to ensure, that column names are equal in laravel?

I am currently working on a laravel php project. In this case, a table containing countries should be created. There are three fields within the table: a short country code column called country_code and the name of the country in german and english language in the columns country_name_de and country_code_en. This results in the following model class: Further, there is

Advertisement