mercredi 24 janvier 2018

Laravel DB Query count always NULL Value Table

I use this Code to Count my referrals. i have 3 Users where has an Value (ID) in referer_id and one User with NULL. But why i get as Result always 1 and not 3 ?? It workes always for me, i dont know whats the Problem or why Count this Query the row with NULL?

<?php $count = DB::table('referral_user')->where('referer_id')->count(); echo $count; ?>

Anyone an Idea?

Thanks



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire