the situation:
I have one mySQL database and I want to get a dinstinct count of the column C_ID where the set timestamp is like the current day (e.g. 2015-08-14)
in phpMyAdmin it works fine:
SELECT COUNT(DISTINCT C_ID) FROM table WHERE touched_at LIKE '2015-08-14%'
the result is 32; but in Laravel 5 I get 320 because the distinct function does not work for me
$date = date('Y-m-d');
$one = DB::table('talbe')
->select()
->where('touched_at', 'like', "$date%")
->distinct('C_ID')
->count();
Can you please assist me with this problem?
Thanks in advance Timo