The placement of data into MySQL is unsuccessful

Source: Internet
Author: User
Inserting data to MySQL is unsuccessful
Error content:

You have a error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use near ' t produce Ultraviolet Lig HT, make the ring 6. Its become more clean and comfort ' at line 8

echo the statement that inserts data into the database is as follows:

After testing, it should be the Re_mark field is out of the question, because I try to insert a smaller number of words in this field, it can be successful.
(The type definition for the Re_mark field is: ... re_mark text,....

SQL Code
  Insert into product (p_name,p_class,p_model,re_mark,pic) VALUES (' Substantial objection ', ' substantial objection ', ' ddfdf ', ' 1. Energy saving:70% energy than common fluorescent lamp; 2. The green environmental protection:led tube No ultraviolet, such as infrared no radiation and contains no mercury and other harmful substances; 3. Long life:led Tube Normal use for 50000 hours; 4. No stroboscopic:led constant, effectively reduce LED light failure, start fast, no flash, protect eyes;  5. Reduce mosquito:different from and light source ultraviolet attract a mosquito, LED don ' t produce ultraviolet light, Make the Ring 6. its become and comfortable; 7. Color is rich:make full use of the advantage of the rich Color LED production various emitting light colors tubes; 8. Use chip Epistar from Taiwan, luminous efficiency is the highest; 9. Shell with the aluminium, PC material, circuit boards use of strength fiber board, combined with compact Structur E and assembly process, so that is only the TUbe heat sex greatly improved, ensure that led work in low temperature and try to minimize the LEDs light failure;  10.The application Places:office buildings,factories,shopping Malls, schools, public, indoor lighting and colour, such as  Home decoration and through the CE and ROHS the authentication ', ' upfiles/cr-kngqqmymuw.jpg ')


------Solution--------------------
In the forum's highlighted SQL code pattern, the string should be red, and the part you correspond to Re_mark is colorful
Observe the red part of the end of the place LED don ' t, apparently that "'" do have to do escape processing
Since you have not complied with the written conventions of the SQL instructions, you only have to taste the consequences of the violation.
------Solution--------------------
discuss

SQL Code

Insert INTO product (P_NAME,P_CLASS,P_MODEL,P_SPECA,P_SPECB,P_SPECC,P_SPECD,P_SPECE,P_SPECF,P_SPECG,P_SPECH,P_ Speci,p_specj,p_speck,re_mark,in_time, Title,pic) VALUES (' 2222 ', ' 3333333 ',......
  • 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.