0
select name, birthday 
from user 
where uid in (SELECT uid2 FROM friend WHERE uid1 = me()) 
    and birthday != null;

结果是

{
  "error": {
    "message": "(#602) NULL is not a member of the user table.", 
    "type": "OAuthException", 
    "code": 602
  }
}

我可以以某种方式过滤掉空值吗?

4

2 回答 2

0

这应该会消除它在一年中的几个月中用于获取常见字母的所有空值

SELECT name, birthday, email, uid FROM user WHERE uid in (SELECT uid2 FROM friend WHERE uid1 = me()) AND (strpos(lower(birthday),"a") >=0 OR strpos(lower(birthday),"e") >=0 OR strpos(lower(birthday),"u") >=0) ORDER BY birthday_date

于 2013-06-12T21:09:37.217 回答
0

无需使用 str* 函数...只需使用 'where field ' 排除空值,或使用 'where not field ' 排除非空值。对于这个特定的例子:

从生日和 uid 所在的用户中选择姓名、生日(SELECT uid2 FROM friend WHERE uid1 = me())

于 2013-12-18T08:04:44.187 回答