sprintf(SqlCall, "select customerid, nums, deptcode, telephone, familyphone, littlephone, officephone, state+1, result, id from %s where state between 0 and 2 and result = 0 and enable = 1 and callstate = 0 order by state %s limit %d", worktable, count >= 0 ? "asc" : "desc", abs(count));执行这个SQL后,取telephone, familyphone, littlephone, officephone字段,为这4个字段的值,设置优先级(优先级为:telephone>littlephone>familyphone>officephone)
1.现在要求在数据库另建一张表set_callphone_priority 来设置他们的优先级,请问这个表怎么设计?数据库SQL思路