PHP开发教程

MySQL mod()函数

MOD(N,M)

该函数返回N除以M后的余数. 分请看下面的例子:

mysql>SELECT MOD(29,3);
+---------------------------------------------------------+
| MOD(29,3)                                               |
+---------------------------------------------------------+
| 2                                                       |
+---------------------------------------------------------+
1 row in set (0.00 sec)


Powered by PHP二次开发 ©2008-2017