php - 如何使用查询在mysql表中插入html代码

标签 php mysql

    INSERT INTO Products  (Backorderable , CategoryID , Cost , CostExTax , DetPage , Enabled , FreightMode , ImageFile , Inventory , LongDescription , LongDescriptionMode , PerUnitShippingCharge1 , PerUnitShippingCharge2 , PerUnitShippingCharge3 , PerUnitWeight , ProductCode , ProductColor , ProductName , ProductSize , QBModified , Service , ShortCode , ShortDescription , ShortDescriptionMode , UseColor , UseSize , PageTitle , MetaDescription , MetaKeywordList , UseDefaultPageTitle , UseGlobalMetaDesc , UseGlobalMetaKeywords , SortOrder , PlainTextDescription , IncludeInFeeds , Available , HidePrice , HideBuyButton , UnavailableMessage , dtModified , ProductID , RRP ) VALUES (0, NULL, 199, 0, -1, -1, NULL, N'images/stories/virtuemart/product/slice.jpg', 0, N'<P class=MsoNormal><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">The SLICE™ Fabrique is a revolutionary fabric-cutting tool that makes quilting easier. </SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">Don't spend hours cutting intricate designs with scissors when you can save time by allowing the </SPAN><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">SLICE™</SPAN><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt"> Fabrique to do all the work for you. The </SPAN><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">SLICE™</SPAN><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt"> Fabrique works with design cards specifically customized for fabric so you can cut alphabets, numbers, flowers, icons, basic shapes, and more.</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">Apply a fusible web to your cotton fabric, felt or flannel and you are ready to start Slicing. If you can imagine it, you can </SPAN><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">SLICE™</SPAN><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt"> it.<SPAN>&nbsp; </SPAN></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">The </SPAN><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">SLICE™</SPAN><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt"> Fabrique is unlike anything you have ever seen. It's a one-of-a-kind tool that fits within everybody's budget. Save time and money while creating projects that will last a lifetime. </SPAN></P><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">
<DIV><FONT size=2 face=Arial>The Machine comes with 3 replacement blades, blade adjustment wrench, 6x6" glass cutting mat, repostitionable adhesive, foam brush, 3- 6x6" fusable web sheets, quick start guide, apllique basics SD design card, design card book.</FONT></DIV></SPAN>
<P class=MsoNormal><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt"></SPAN>&nbsp;</P>', NULL, 0, 0, 0, 0, N'37013', NULL, N'Slice Fabrique RRP $250.00', NULL, 0, 0, N'', NULL, NULL, 0, 0, N'', NULL, NULL, -1, -1, -1, NULL, NULL, -1, -1, 0, 0, NULL, NULL, 51, NULL);

我想将此记录插入到 mysql 表中,但由于 slahes 问题,它没有插入,问题是我无法使用 mysql_real_escape_string 我必须手动删除每个引号 mysql 中可以执行此操作的任何函数对我来说...我有数千张这样的记录

最佳答案

不要 - 我再说一遍,不要将这些东西放入数据库中。只要把数据放进去就可以了。然后,当提取它时,您可以在它周围放置 HTML/CSS 花哨的东西。

关于php - 如何使用查询在mysql表中插入html代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12544427/

相关文章:

php - 我如何在 CodeIgniter Controller 中调用这个函数?

php - MySql:按 ASC 排序,底部为空

php - 如何用php检查验证mongodb id

php - Jquery UI Portlets - 使用 Ajax 加载和编辑 portlet

python - 使用 PYMYSQL 更正 Python 中的 SQL 用法

c# - 编码问题。我哪里错了?

php - Symfony2 Doctrine : How to disable mysql connection?

php - 将 Codeigniter 购物车数据插入数据库

javascript - 如何使用 codeigniter 将动态输入值插入数据库?

java - 在哪里查找我的程序中第 331 行更新数据库语句中的错误