В
Size: a a a
В
В
А
В
M
$ar->find()
->where(['not', ['playlist_source' => null, 'playlist_id' => null]]);
$ar->find()
->where(['not', ['playlist_source' => null]]);
->andWhere(['not', ['playlist_id' => null]]);
AM
AM
AM
AM
AM
M
$albums = $this->ar2->findAlbums()
->where(['not', ['playlist_source' => null, 'playlist_id' => null]]);
if ($album->playlist_source === 'vimeo') {
var_dump($album->playlist_source);
var_dump($album->playlist_id);
exit;
}
string(5) "vimeo"
NULL
AM
M
SELECT `mr42_lyrics_2_albums
.* FROM mr42_lyrics_2_albums
LEFT JOIN mr42_lyrics_1_artists
artist
ON mr42_lyrics_2_albums
.parent
= artist
.name
WHERE NOT ((`playlist_source` IS NULL) AND (`playlist_id` IS NULL)) ORDER BY artist
.name`
M
AM
M
M
SELECT `mr42_lyrics_2_albums`.* FROM `mr42_lyrics_2_albums` LEFT JOIN `mr42_lyrics_1_artists` `artist` ON `mr42_lyrics_2_albums`.`parent` = `artist`.`name` WHERE ((`playlist_source` IS NOT NULL) AND (`playlist_id` IS NOT NULL)) ORDER BY `artist`.`name`
M
SELECT `mr42_lyrics_2_albums
.* FROM mr42_lyrics_2_albums
LEFT JOIN mr42_lyrics_1_artists
artist
ON mr42_lyrics_2_albums
.parent
= artist
.name
WHERE (NOT (`playlist_source` IS NULL)) AND (NOT (`playlist_id` IS NULL)) ORDER BY artist
.name`
:)$albums = $this->ar2->findAlbums()
->joinWith('artist')
->where(['and', ['not', ['playlist_source' => null]], ['not', ['playlist_id' => null]]])
->orderBy(['artist.name' => SORT_ASC]);
M
->where(['and', ['is not', 'playlist_source', null], ['is not', 'playlist_id', null]])Окончательный ответ
AM