Database error: Invalid SQL: INSERT INTO user_deleted SELECT * FROM user WHERE userid='6529' MySQL Error: 1136 (Column count doesn't match value count at row 1) Session halted. need help fixing that, will pay $10 if you can step by step guide me through this MSN ID:
Has this been done? If not, I'll be sure to fix it... You cant have Insert Into and Select in the same command..
was this sorted? i use INSERT INTO table1 SELECT from table2 queries almost everyday and should be able to find the issue
No, you can use that. The problem is that the columns don't match. If you do INSERT INTO table_a SELECT * FROM table_b WHERE x, table_a must have the same columns as table_b.
If the colums dont count it means that you have someting like this TBL1 - Members: {id, name, pass, email} TBL2 - Groups: {id, name, administrator_accross} and them you try to do someting like this INSERT INTO Groups VALUES SELECT * FROM `Members` WHERE `id`= '1' so the colums dont match.. anyway i dont recomened you to use SELECT inside INSERT and to tell the truth, i didnt see anyone who do that i dont think its "leagal expression"... butdidnt check it myself.... anyway, good luck
hmm... if you haven't changed a thing neither in the database nor the code then its something with to do with the data. maybe some data is not being espaced properly and it's considering as another column and they no longer match. i'd need to look into the query and all the data you're trying to do this with