• <small id='G8guo'></small><noframes id='G8guo'>

    <i id='G8guo'><tr id='G8guo'><dt id='G8guo'><q id='G8guo'><span id='G8guo'><b id='G8guo'><form id='G8guo'><ins id='G8guo'></ins><ul id='G8guo'></ul><sub id='G8guo'></sub></form><legend id='G8guo'></legend><bdo id='G8guo'><pre id='G8guo'><center id='G8guo'></center></pre></bdo></b><th id='G8guo'></th></span></q></dt></tr></i><div id='G8guo'><tfoot id='G8guo'></tfoot><dl id='G8guo'><fieldset id='G8guo'></fieldset></dl></div>
      <bdo id='G8guo'></bdo><ul id='G8guo'></ul>

    <legend id='G8guo'><style id='G8guo'><dir id='G8guo'><q id='G8guo'></q></dir></style></legend>

    <tfoot id='G8guo'></tfoot>

        插入期间的撇号(Mysql)

        apostrophe during Insert (Mysql)(插入期间的撇号(Mysql))
            <tbody id='s58F5'></tbody>

            <bdo id='s58F5'></bdo><ul id='s58F5'></ul>

          • <i id='s58F5'><tr id='s58F5'><dt id='s58F5'><q id='s58F5'><span id='s58F5'><b id='s58F5'><form id='s58F5'><ins id='s58F5'></ins><ul id='s58F5'></ul><sub id='s58F5'></sub></form><legend id='s58F5'></legend><bdo id='s58F5'><pre id='s58F5'><center id='s58F5'></center></pre></bdo></b><th id='s58F5'></th></span></q></dt></tr></i><div id='s58F5'><tfoot id='s58F5'></tfoot><dl id='s58F5'><fieldset id='s58F5'></fieldset></dl></div>

            <small id='s58F5'></small><noframes id='s58F5'>

            <legend id='s58F5'><style id='s58F5'><dir id='s58F5'><q id='s58F5'></q></dir></style></legend>

              1. <tfoot id='s58F5'></tfoot>
                  本文介绍了插入期间的撇号(Mysql)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我通过 PHP 文本框获取数据,并使用普通的插入命令将其插入 MySQL 数据库.文本框接受用户对文本框旁边的特定登录 ID 的评论.问题是,当用户输入撇号 (') 例如句子我们必须照顾好 PC"时,会引发错误.

                  I am getting data though a PHP text box and inserting it into a MySQL database with a normal insert command. The text box takes in a comment frm the user for a particular Accession ID next to the text box. The problem is that when a user types in apostrophe (') for example the sentence "We have to take care of the PC's", an error is thrown.

                  我知道它为什么会发生,因为 SQL 假定它是该值的字符串的结尾,但我不知道如何转义它.我宁愿在 MYSQL 中转义它.

                  I know why its happening because the SQL assumes it as the end of the string for that value but I don't know how to escape it. I would prefer escaping it in MYSQL.

                  如果我在 MySQL 中对其进行转义,即使没有生成错误并且插入工作正常,它仍然可以作为 SQL 注入被利用吗?

                  If I escape it in MySQL can it still be exploited as SQL injection even if no error is generated and the insert works fine?

                  推荐答案

                  使用mysql_real_escape_string(),或者更好的是,使用带有 PDO.

                  这篇关于插入期间的撇号(Mysql)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                    <tfoot id='3JMyD'></tfoot>
                      <tbody id='3JMyD'></tbody>

                        • <bdo id='3JMyD'></bdo><ul id='3JMyD'></ul>
                          <i id='3JMyD'><tr id='3JMyD'><dt id='3JMyD'><q id='3JMyD'><span id='3JMyD'><b id='3JMyD'><form id='3JMyD'><ins id='3JMyD'></ins><ul id='3JMyD'></ul><sub id='3JMyD'></sub></form><legend id='3JMyD'></legend><bdo id='3JMyD'><pre id='3JMyD'><center id='3JMyD'></center></pre></bdo></b><th id='3JMyD'></th></span></q></dt></tr></i><div id='3JMyD'><tfoot id='3JMyD'></tfoot><dl id='3JMyD'><fieldset id='3JMyD'></fieldset></dl></div>

                          <small id='3JMyD'></small><noframes id='3JMyD'>

                            <legend id='3JMyD'><style id='3JMyD'><dir id='3JMyD'><q id='3JMyD'></q></dir></style></legend>