yii2判断数据是否存在
$exists = ModelName::find()->where([ ‘column_name‘ => $value])->andWhere([‘column_name‘ => $value])->exists();
判断数据是否存在
原文:http://www.cnblogs.com/baby123/p/4834193.html