阅读背景:

在MySQL的SELECT子查询中使用IF

来源:互联网 

I have the following query:

我有以下查询:

  SELECT `users`.`id`, `login`, `fullname`, `active`, `sex`, `height`,
  `special-title`, `language`, `body-fat`,
  `main-photo-id`, `main-photo-offset`, `weight`,
  `objective`, `level`, `config-comments-type`,
  (
     SELECT `type`
     FROM `users-pro`
     WHERE
        (`user` = `users`.`id`)
        AND
        (`starts` <= $time)
        AND(
           (`ends` > $time)
           OR
           (`ends` IS NULL)
        )
     LIMIT 1
  ) as `account_type`
  FROM `users`
  SELEC



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: