I'm having the error "# 1136 - Column count does not match the count of values on line 1" in MySQL, I use PHPMyAdmin to administer the database. I'm doing an insert into a table, using two other tables.
I have information about a table called company_staff and a table called company_qrcode, I am putting specific information from these tables into a table called "company_staff_tables", this I was able to do, however, in that table I need to insert two data, the date (using CURDATE) and the insertion time (using NOW), I was able to do until I need to put the date and time, however, when I was adding the commands to the date and time, I had several errors and I was trying to fix and it only appeared more and this I can not resolve, what is wrong in SQL?
INSERT INTO company_staff_table (company_id, staff_id, table_id, qrcode, manager_id, on_duty, start_date)
SELECT q.company_id, s.id, q.table_id, q.qrcode, s.manager_id,
s.on_duty, t.start_date, CURDATE() as data_atual
FROM company_qrcode q, company_staff s, company_staff_table t
WHERE q.company_id = s.company_id AND s.id = 28 AND q.qrcode = 'QR1-CP1-TB1'
GROUP BY q.company_id, s.id, q.table_id, q.qrcode, s.manager_id, s.on_duty;
In this example, the time, date only, is not yet entered. I've read that it says that my input parameters are not the same as what I'm asking, where is the error that I did not understand, because the number is the same.