Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught mysqli_sql_exception: Duplicate entry #1032

Open
TwinMist opened this issue Jun 5, 2024 · 1 comment
Open

Uncaught mysqli_sql_exception: Duplicate entry #1032

TwinMist opened this issue Jun 5, 2024 · 1 comment

Comments

@TwinMist
Copy link

TwinMist commented Jun 5, 2024

Just migrated to php 8.3 was using 7.2 before with no issues.
i have multiple inserts within the same script which somehow is causing duplicated inserts from another part of the script
on this error the table does not even have primary key date this was a insert from another part of the script
any ideas?

thrown in /scripts/vendor/thingengineer/mysqli-database-class/MysqliDb.php on line 1545
[Wed Jun 5 17:26:05 2024] 127.0.0.1:41774 [500]: PUT /indexLive.php - Uncaught mysqli_sql_exception: Duplicate entry '2024-06-05 17:26:05-6654910' for key 'Date' in /scripts/vendor/thingengineer/mysqli-database-class/MysqliDb.php:1545
Stack trace:
#0 /scripts/vendor/thingengineer/mysqli-database-class/MysqliDb.php(1545): mysqli_stmt->execute()
#1 /scripts/vendor/thingengineer/mysqli-database-class/MysqliDb.php(837): MysqliDb->_buildInsert()
#2 /scripts/vendor/thingengineer/mysqli-database-class/MysqliDb.php(866): MysqliDb->insert()
#3 /scripts/configs/Live/LogLicenses.php(21): MysqliDb->insertMulti()
#4 /scripts/indexLive.php(439): require_once('...')
#5 {main}

@RivenSkaye
Copy link
Contributor

Could it perhaps be a UNIQUE constraint (possibly combined with a default value of NOW()) on one of the columns which you're bulk-updating?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants