PDOException only when deleting
PDOException only when deleting
Allcor
Posts: 16Questions: 5Answers: 0
Everything worked in the past, after some adjustments on other parts of the site, this error shows up.
<br />
<b>Fatal error</b>: Uncaught PDOException: There is no active transaction in /home/naktdata/collectie/DataTablesEditor/Database/Query.php:194
Stack trace:
#0 /home/naktdata/collectie/DataTablesEditor/Database/Query.php(194): PDO->rollBack()
#1 [internal function]: DataTables\Database\Query::rollback(Object(PDO))
#2 /home/naktdata/collectie/DataTablesEditor/Database/Database.php(311): call_user_func('DataTables\\Data...', Object(PDO))
#3 /home/naktdata/collectie/DataTablesEditor/Editor/Editor.php(684): DataTables\Database->rollback()
#4 /home/naktdata/static/collectie/php/isolates_edit.php(130): DataTables\Editor->process(Array)
#5 {main}
thrown in <b>/home/naktdata/collectie/DataTablesEditor/Database/Query.php</b> on line <b>194</b><br />
I have a hard time finding out what is even causing this let alone how to solve it. I have started using the Django rest on other parts of the site and am now afraid it has done something to the database that is causing this.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Can you show me the PHP Editor code you are using please?
ALlan
this is the server script called with Ajax on the page that gives the error.
My guess is that there is an SQL error occurring, and something else is closing down the db connection.
Could you change:
to have:
It might then show a more useful error message.
Allan
Thank you very much. Indeed got something I can work with.
Should be able to figure out how to remove that. The foreign key has cascade on delete, Can alway's try with a preRemove event.