please help mee, can you tell me way ?
$totalah = Sah::find()
->select('mhs, SUM(IF(status_kehadiran = 1,status_kehadiran , 0))AS K3211335')
->where([
'kode_mk'=> 'K3211335'
])
->groupBy('mhs')
->all();
echo "<pre/>"; print_r($totalah);
die;
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS
K3211335FROMsahWHEREkode_mk='K3211335' GROUP BYmhs' at line 1 The SQL being executed was: SELECTmhs, SUM(IF(status_kehadiran = 1,status_kehadiran,0))ASASK3211335FROMsimak_absen_harianWHEREkode_mk='K3211335' GROUP BYmhs`