search

Home  >  Q&A  >  body text

php - data insertion problem

I'm a little speechless. It's such a simple statement, but I searched for a long time and couldn't find out why the data couldn't be inserted.

There is no problem with the local database. It should be a code problem, but I am blinded and cannot find the error. Please help me.



##There is no data at the end, the links are all normal, and there is no problem in submitting data from other web pages.

伊谢尔伦伊谢尔伦2755 days ago366

reply all(4)I'll reply

  • 漂亮男人

    漂亮男人2017-05-16 13:15:55

    Finally I found the correct answer. declare is a system reserved keyword, so this database table cannot be used. . . After all, he is too young. . .

    reply
    0
  • 黄舟

    黄舟2017-05-16 13:15:55

    Your MySQL port seems to be 3305, but you did not specify it. The default port is 3306.

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-16 13:15:55

    Do I need to specify the fields of the table?

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-16 13:15:55

    First of all, it is not recommended to use MySQL extension, it is unsafe, and PHP has been abandoned. Use MySQLi or PDO.

    Secondly. If the execution fails, use mysql_error()
    to obtain the error information.

    reply
    0
  • Cancelreply