insert into `combined_results_by_typecode` (product_id, typecode, group_id, group_name, passed_count, failed_count, terminated_count, error_count, incomplete_count, test_date)
select
`product_id`,
`tps_v4`.`ptctbl`.`TypeCode` as 'TypeCode',
`test_group`,
`test_groups.group_name`,
`date_created`,
SUM(`success_count`),
SUM(`fail_count`),
SUM(`terminated_count`),
SUM(`error_count`),
SUM(`incomplete_count`)
from `combined_test_results`
join `tars-test`.`test_groups`
on `combined_test_results.test_group = test_groups_id`
join `tps_v4`.`ptctbl`
on `tcid` = `product_id`
where date_created = ?
group by `product_id`, `date_created` , test_group
It's the INSERT INTO that's throwing me. Thanks
If you are using an ORM and an MVC framework I will suggest to follow the structures and patterns that insert based on the results of the select can be converted to php with a for each and models that represent that tables
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community