摘要:
联表查询两个返回值的处理方法:public static function getUserConsume($period,$character){$uid=self::getByCharacter($character);if($uid&&$period){$userconsumescore = self :: getuserconsumescore($period, $uid);$userscore = self :: getuserscore($period, $uid);---------上面返回两个键名相同的二维数组,但是返回字段不同$keys = array_uniq 阅读全文
摘要:
生成随机数(根据条件和数目)function rand($length,$num){ $result=''; $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz'; $maxLength=strlen($chars)-1; for($i=1;$i<=$num;$i++){ $result="";//先写入内存 for($j=1;$j<=$length;$j++){ $result.=$chars[mt_rand(0,$maxLength) 阅读全文