想做一个筛选的功能,分成:全部、A、B、C、D、其他,现在其他不知道如何写?
发布于 4 年前 作者 gchen 1662 次浏览 来自 问答

比如 数据库字段 test[A,B] 筛选类型分为全部、A、B、C、D、其他,通过给筛选用到的变量赋值

筛选有A的数据 let card=A, where({ test:card })

有B的数据 let card=B, where({ test:card })

有C的数据 let card=C, where({ test:card })

如果要筛选全部,和其他,该如何写,保证不改变语法,只通过赋值就可以实现?请教

1 回复

数据库记录结构是怎样的,test是数组?

回到顶部