Try to run this syntax on localhost is fine, but on hosting seem like old version of phpmysql
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 'groups as c WHERE a.user_id=b.id AND a.group_id=' at line 2
SELECT b.id,b.first_name,b.last_name,b.username,b.email,c.name,FROM_UNIXTIME(b.created_on) as created_on,b.active FROM users_groups as a , users as b , groups as c WHERE a.user_id=b.id AND a.group_id=c.id
Filename: models/Users_model.php
Line Number: 40
MODEL_FILE
function get_all_query()
{
$sql = "SELECT b.id,b.first_name,b.last_name,b.username,b.email,c.name,FROM_UNIXTIME(b.created_on) as created_on,b.active
FROM users_groups as a , users as b , groups as c
WHERE a.user_id=b.id
AND a.group_id=c.id";
return $this->db->query($sql)->result();
}
Please..