Add this validation while saving records like below code:
$artist_q1 = $this->DbYtVideoVersions->find()->where(['track_name'=>$artist->track_match, 'artist_name'=>$artist->artist_match]);
if($artist_q1->count()<4){
$playlist_en = $this->DbYtVideoVersions->newEntity();
$this->DbYtVideoVersions->patchEntity($playlist_en, $trackData);
$this->DbYtVideoVersions->save($playlist_en);
}
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments