Title: Database Error on new ARI PRO Quiz
Last modified: December 18, 2018

---

# Database Error on new ARI PRO Quiz

 *  Resolved [lordandy1984](https://wordpress.org/support/users/lordandy1984/)
 * (@lordandy1984)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/database-error-on-new-ari-pro-quiz/)
 * Hi,
 * when creating a new quiz, it seems the code tries to insert a “0” into an auto_increment
   field.
    And then the quiz itself also does not get an ID and I cannot use it.
   Anything I can fix here or change? My Page is running using PHP7.2
 * Regards,
    Andy
 * Duplicate entry ‘0’ for key ‘PRIMARY’ for query INSERT INTO `wp_asq_personalities`(`
   personality_id`, `personality_guid`, `quiz_id`, `personality_title`, `personality_content`,`
   image_id`, `personality_order`) VALUES (‘0’, ‘e7f5331a-65d3-45dd-a29a-*****’,‘
   0’, ‘TEWI oder WIWI’, ”, ”, ‘1’) von do_action(‘admin_page_ari-stream-quiz-quiz’),
   WP_Hook->do_action, WP_Hook->apply_filters, Ari\App\Plugin->__call, Ari_Stream_Quiz\
   Controllers\Quiz\Save->execute, Ari_Stream_Quiz\Models\Quiz->save, Ari_Stream_Quiz\
   Entities\Quiz_Personality->store, Ari\Entities\Entity->store

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [arisoft](https://wordpress.org/support/users/arisoft/)
 * (@arisoft)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/database-error-on-new-ari-pro-quiz/#post-11004110)
 * Hello
 * It is normally to use NULL or 0 value for auto increment column in MySQL database.
   0 will not work only if [NO_AUTO_VALUE_ON_ZERO](https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sqlmode_no_auto_value_on_zero)
   sql mode is enabled, but it is not recommended more.
 * Could you execute the following queries on your DB to check what sql modes are
   used:
 * SELECT @@GLOBAL.sql_mode
 * SELECT @@SESSION.sql_mode
 *  Thread Starter [lordandy1984](https://wordpress.org/support/users/lordandy1984/)
 * (@lordandy1984)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/database-error-on-new-ari-pro-quiz/#post-11004331)
 * Hello [@arisoft](https://wordpress.org/support/users/arisoft/),
 * you’re right, in my modes there is a NO_AUTO_VALUE_ON_ZERO.
 * As I don’t know what changing this has global effects as I run dozens of applications
   and also WordPress on this database, I will set it just for this session and 
   check if it works.
 * Regards,
    Andy
 *  Thread Starter [lordandy1984](https://wordpress.org/support/users/lordandy1984/)
 * (@lordandy1984)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/database-error-on-new-ari-pro-quiz/#post-11004379)
 * Hi [@arisoft](https://wordpress.org/support/users/arisoft/),
 * I can confirm, after removing the NO_AUTO_VALUE_ON_ZERO it is working.
 * Regards,
    Andy

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Database Error on new ARI PRO Quiz’ is closed to new replies.

 * ![](https://ps.w.org/ari-stream-quiz/assets/icon.svg?rev=1525802)
 * [ARI Stream Quiz - WordPress Quizzes Builder](https://wordpress.org/plugins/ari-stream-quiz/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ari-stream-quiz/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ari-stream-quiz/)
 * [Active Topics](https://wordpress.org/support/plugin/ari-stream-quiz/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ari-stream-quiz/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ari-stream-quiz/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [lordandy1984](https://wordpress.org/support/users/lordandy1984/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/database-error-on-new-ari-pro-quiz/#post-11004379)
 * Status: resolved