You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey all - I'm getting a weird error for stress.php that I haven't gotten before - is anyone else getting it? it's saying that user0@example.com is being duplicated as an email. nothing appears to be wrong with the code itself. Error reads:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'user0@example.com' for key 'email'' in /nfs/stak/students/m/mahughj/public_html/cs290-project/stress.php:119
Stack trace:
#0 /nfs/stak/students/m/mahughj/public_html/cs290-project/stress.php(119): PDOStatement->execute()
#1 {main}
thrown in /nfs/stak/students/m/mahughj/public_html/cs290-project/stress.php on line 119
The text was updated successfully, but these errors were encountered:
Yeah, known problem. Stress.php tries to avoid duplicate keys by deleting all the users and groups above a certain id (on lines 90-93), figuring that they were probably added by a previous run of stress.php. I used user_id > 8 to select the rows to delete, even though create only adds 6 users, because when i wrote it i had created two extra users that i didn't want to delete. That's probably the cause of your problem. Adjust the limit down to 6 or whatever you need (or 0, to delete everything). Or just run create.php to reset everything.
Hey all - I'm getting a weird error for stress.php that I haven't gotten before - is anyone else getting it? it's saying that user0@example.com is being duplicated as an email. nothing appears to be wrong with the code itself. Error reads:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'user0@example.com' for key 'email'' in /nfs/stak/students/m/mahughj/public_html/cs290-project/stress.php:119 Stack trace: #0 /nfs/stak/students/m/mahughj/public_html/cs290-project/stress.php(119): PDOStatement->execute() #1 {main}
thrown in /nfs/stak/students/m/mahughj/public_html/cs290-project/stress.php on line 119
The text was updated successfully, but these errors were encountered: