For help, php + mysql solution

Source: Internet
Author: User
Please help, php + mysqlPHPcode & lt ;? Php $ con = mysql_connect (SAE_MYSQL_HOST_M. ':'. SAE_MYSQL_PORT, SAE_MYSQL_USER, SAE_MYSQL_PASS); mysql_select_db (& quo for help, php + mysql
PHP code
  
  



The imgstore table is like this.
Imgnamevarchar (10000) utf8_general_ci no
Introducetextutf8_general_ci no


Why can only insert the name for, introduce is not inserted into the database?




------ Solution --------------------
Insert into imgstore (imgname, introduce) values ('for', 'test ')";
------ Solution --------------------
Insert into imgstore (imgname, introduce) SELECT 'for ', 'test'
------ Solution --------------------
Discussion
PHP code

$ Con = mysql_connect (SAE_MYSQL_HOST_M. ':'. SAE_MYSQL_PORT, SAE_MYSQL_USER, SAE_MYSQL_PASS );
Mysql_select_db ("app_zqstudysae", $ con );

$ SQL = "insert into imgstore values ('for', 'test ')";
My ......

------ Solution --------------------
Mysql_query ($ SQL, $ con) or die (mysql_error ());

If any error occurs, post an error message.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.