public function delete($group_id)
{
$this->db->where('t1.*, t2.*, t3.*, t4.*, t6.*, COUNT(t5.id) AS total_students')
->join('groups_days AS t6', 't1.group_id = t6.group_id')
->join('groups_members AS t5', 't1.group_id = t5.group_id')
->group_by('t1.group_id')
->delete("groups AS t1")
->result();
}
Error Number: 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 `t1` WHERE t1., t2., t3., t4., t6.*, COUNT(t5.id) AS total_students' at line 1
DELETE FROM `groups` AS `t1` WHERE t1., t2., t3., t4., t6.*, COUNT(t5.id) AS total_students
Filename: D:/www/domains/uzdev/taraqqiyot/application/models/Group_model.php
My delete not working and showing above error. What is wrong here