Error Number: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'lopestvs_easyplex.view_log.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
SELECT *, count(content_id) as max
FROM view_log
WHERE date LIKE '10-26-2022'
GROUP BY content_id
ORDER BY max DESC LIMIT 6
Filename: models/Admin_model.php Line Number: 77
function mostViewedToday() {
$todate = date('m-d-Y', time());
$json =array();
$query = $this->db->query("SELECT *, count(content_id) as max FROM view_log WHERE date LIKE '$todate' GROUP BY content_id ORDER BY max DESC LIMIT 6");
$_I = "0";
foreach ($query->result() as $row)
{
This error occurs after entering login and password