Welcome Guest, Not a member yet? Register   Sign In
trying to summarize a table
#1

I have an sql line that is failing. 


$sql='INSERT INTO weekly_summary_activities (email,campaign, admin_email, type, year, week, business_comp, project,  activity, hours) SELECT email, campaign, admin_email, type, year, week, business_comp, project, activity, SUM(hours) FROM activity_log GROUP BY email,  campaign,  project, business_comp, activity';
$query=$this->db->query($sql);


weekly_summary_activities has an autoinc field called id. What do I do about that? Of course I don't have the id field in my query. when I run this is phpmyadmin I get:

#1467 - Failed to read auto-increment value from storage engine
proof that an old dog can learn new tricks
Reply


Messages In This Thread
trying to summarize a table - by richb201 - 12-27-2018, 08:08 AM
RE: trying to summarize a table - by php_rocs - 12-27-2018, 08:59 AM
RE: trying to summarize a table - by richb201 - 12-27-2018, 04:16 PM
RE: trying to summarize a table - by richb201 - 12-27-2018, 10:17 PM
RE: trying to summarize a table - by InsiteFX - 12-28-2018, 04:27 AM
RE: trying to summarize a table - by php_rocs - 12-28-2018, 08:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB