yii2判断数据库字段不为空,相关内容,中文网,字段,示例,框架
yii2判断数据库字段不为空
易采站长站,站长之家为您整理了yii2判断数据库字段不为空的相关内容。
yii2判断数据库字段is null,如下:
相关教程推荐:yii框架
示例:$query = new Query; $query->select('ID, City,State,StudentName') ->from('student') ->where(['IsActive' => 1]) ->andWhere(['not', ['City' => null]]) ->andWhere(['not', ['State' => null]]) ->orderBy(['rand()' => SORT_DESC]) ->limit(10);
更多编程相关内容,请关注php中文网编程入门栏目!以上就是关于对yii2判断数据库字段不为空的详细介绍。欢迎大家对yii2判断数据库字段不为空内容提出宝贵意见