drouie2014 2012-01-25 18:15
浏览 21

mysql存储正确和错误的答案字符串

I have a game. In the game, people make many choices out of 2 options.

The choice can be either right or wrong and I am storing the result of their run through the game (which can be a very large length) as a string with 1 for a right answer and 0 for wrong answers.

So for example, player 128937 will have stored in his run column the string 00010101010010001010111 as a varchar(5000).

Is there a better way I can store this information in MYSQL? (I am using PHP too if that can help)

  • 写回答

3条回答 默认 最新

  • doushai7225 2012-01-25 18:21
    关注

    Why not use a tinyint(1) for each option rather than using strings?

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度