douxian4888 2009-12-15 09:44 采纳率: 0%
浏览 25

Mysql PHP中的随机数生成

I have 16 million records and need a 8 digit UNIQUE random number for each record, also I want all the numbers to start with 01, and store them in a seperate table, so I can assign the UNIQUE numbers to each record.

I am unsure of how to do this in PHP in order to get 16 million UNIQUE numbers?

Please help?!

J.

  • 写回答

8条回答 默认 最新

  • douhao7677 2009-12-15 09:51
    关注

    With what you specified, this does not seem possible.

    You require 16,000,000 unique numbers from a given 8 digit number, of which the leading 2 is 01.

    That leaves you with only 6 numbers, so your range will be 1,000,000 numbers

    from 01000000 to 01999999.

    This does not seem correct at all.

    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料