Skip to content

Commit

Permalink
fix error SQLSTATE[21S01]: Insert value list does not match column li…
Browse files Browse the repository at this point in the history
…st: 1136 Column count doesnt match value count at row 1
  • Loading branch information
Stierus committed Dec 10, 2013
1 parent f51bc81 commit e746cc1
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/Pinboard/Command/AggregateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
traffic_total, traffic_percent, traffic_per_sec,
hostname
)
SELECT * FROM report_by_hostname;
SELECT req_count, req_per_sec, req_time_total, req_time_percent, req_time_per_sec,
ru_utime_total, ru_utime_percent, ru_utime_per_sec,
ru_stime_total, ru_stime_percent, ru_stime_per_sec,
traffic_total, traffic_percent, traffic_per_sec,
hostname FROM report_by_hostname;
INSERT INTO ipm_report_by_hostname_and_server
(
Expand All @@ -245,7 +249,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
traffic_total, traffic_percent, traffic_per_sec,
hostname, server_name
)
SELECT * FROM report_by_hostname_and_server;
SELECT req_count, req_per_sec, req_time_total, req_time_percent, req_time_per_sec,
ru_utime_total, ru_utime_percent, ru_utime_per_sec,
ru_stime_total, ru_stime_percent, ru_stime_per_sec,
traffic_total, traffic_percent, traffic_per_sec,
hostname, server_name FROM report_by_hostname_and_server;
INSERT INTO ipm_report_by_server_name
(
Expand All @@ -255,7 +263,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
traffic_total, traffic_percent, traffic_per_sec,
server_name
)
SELECT * FROM report_by_server_name;
SELECT req_count, req_per_sec, req_time_total, req_time_percent, req_time_per_sec,
ru_utime_total, ru_utime_percent, ru_utime_per_sec,
ru_stime_total, ru_stime_percent, ru_stime_per_sec,
traffic_total, traffic_percent, traffic_per_sec,
server_name FROM report_by_server_name;
';
$db->query($sql);

Expand Down

0 comments on commit e746cc1

Please sign in to comment.