|
建立中奖规则表,如图
计算红球中奖个数:- Function GetRedCount(str0 As String, str1 As String) As Integer
- Dim Arr0, Arr1
- Dim i As Integer
- Dim J As Integer
- Dim m As Integer
- Arr0 = Split(str0, "-")
- Arr1 = Split(str1, "-")
- m = 0
- For i = 0 To 5
- For J = 0 To 5
- If Arr0(i) = Arr1(J) Then
- m = m + 1
- Exit For
- End If
- Next J
- Next i
- GetRedCount = m
- End Function
复制代码 计算蓝球中奖个数:
- Function GetBlueCount(str0 As String, str1 As String) As Integer
- Dim Arr0, Arr1
- Dim m As Integer
- Arr0 = Split(str0, "-")
- Arr1 = Split(str1, "-")
- m = 0
- If Arr0(6) = Arr1(6) Then
- m = 1
- End If
- GetBlueCount = m
- End Function
复制代码 查询中奖情况:- SELECT 等级
- FROM 中奖规则
- WHERE 红球中奖个数=GetRedCount("01-04-10-28-29-30-10", "01-04-20-24-28-29-16") and 蓝球中奖个数=GetBlueCount("01-04-10-28-29-30-10", "01-04-20-24-28-29-16");
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|