search

Home  >  Q&A  >  body text

There is no error message when an insert statement is executed in mysql, but an error message is displayed when executed through php.

The statement is generated by the program. There is no problem in copying it directly to FRONT. However, when executed in the program, an error will be prompted:

1062:Duplicate entry '1000000007' for key 'PRIMARY'

Please help me analyze the reasons

叶祖峰叶祖峰2083 days ago1102

reply all(2)I'll reply

  • 叶祖峰

    叶祖峰2019-03-14 22:07:51

    In fact, the insertion is successful, but the error is always prompted

    insert into department_t(department_id,department_type_id,department_name,department_short_name,build_date,department_seq,remark) values(1000000007,1,'Langhe Branch', 'Langhe Branch','2011-01-01',5,'')

    reply
    0
  • Cancelreply