Home  >  Q&A  >  body text

Online question answering system

Mainly do single-choice and multiple-choice questions! I put the questions, options and correct answers into the same database, three questions! !

Can I design the option as a field and store it in json? Are the answers stored in another field?

When the user answers the question, I return all the questions, options and answers. When the user selects the answer, how should I judge whether the answer selected by the user is correct? Or do we need to request the database for the answer?

A峰A峰1487 days ago1387

reply all(2)I'll reply

  • Alex Gao

    Alex Gao2020-08-27 01:07:01

    1. Doesn’t it taste good with implode? Why use json? 2. Re-visit the database to determine whether it is right or wrong.

    reply
    0
  • A峰

    Do the content of the answer field and the content of the options have to be exactly the same? Compare with equal sign?

    A峰 · 2020-08-27 08:24:28
  • Cancelreply