Skip to content
Advertisement

Tag: mysql

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…’)

delete or undo the first query if the second query did not work

im confused about this. Is there any way like to test if all queries are working and not returning erros? if so execute them or return something. I am building a signup method, this have 2 parts: loginInfo(username, password) and the usual Employee info (name, email, etc..). The signup method inserts the Employee info into employee table, then it gets

Delete a HTMLtable row using AJAX

Frameworks used: JavaScript, AJAX, HTML. Cannot use JQuery Have to display SQL table on page Last column of the table should contain an image which acts like a delete button On clicking that delete image, the row should be deleted from HTML table and SQL table In my code the onClick is not working HTML code table rows displayed by

Sum of amount for each date having ‘type’ column in sql

I have table expense_incomes, the structure for table is: I want the sum of expenses and incomes in two different arrays groupBy date. I have tried this code. (In the above Example) I want to push expense into expense_array and income into income_array for 2021-04-02. What I am getting now: Expected Array Structure: Answer I believe you want an aggregated

Advertisement