您的位置 首页 技术

yii2判断数据库字段不为空

yii2判断数据库字段is null,如下: 相关教程推荐:yii框架 示例: $query = new Query; $query->select('ID, Ci…

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);

更多编程相关内容,请关注24课堂在线网编程入门栏目!

以上就是yii2判断数据库字段不为空的详细内容,更多请关注24课堂在线网其它相关文章!

本文来自网络,不代表24小时课堂在线立场,转载请注明出处:https://www.24ketang.cn/40367.html

为您推荐

返回顶部