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

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

  • <legend id='JNw6b'><style id='JNw6b'><dir id='JNw6b'><q id='JNw6b'></q></dir></style></legend>

      1. 查询在 phpmyadmin 中有效,但在 PHP 脚本中无效

        Query works in phpmyadmin but not in PHP script(查询在 phpmyadmin 中有效,但在 PHP 脚本中无效)
        <tfoot id='m2voI'></tfoot>

          1. <legend id='m2voI'><style id='m2voI'><dir id='m2voI'><q id='m2voI'></q></dir></style></legend>

              <bdo id='m2voI'></bdo><ul id='m2voI'></ul>
                <tbody id='m2voI'></tbody>

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

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

                  本文介绍了查询在 phpmyadmin 中有效,但在 PHP 脚本中无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我发现了类似的问题,但还不能解决我的问题.相关代码如下:

                  I found similar questions but can't solve my problem yet. Here is the relevant code:

                  $query = "SELECT * FROM conceptos WHERE descripcion = '$descripcion'";
                  if ($result = mysql_query($query,$connection)){
                      if (mysql_num_rows($result) > 0){
                          //Do something
                      } else {
                          die($query);
                          exit;
                      }
                  } else {
                      die(mysql_errno() . ' - ' . mysql_error());
                      exit;
                  }
                  

                  我在连接或权限方面没有问题,因为此代码片段位于循环内,而其他查询进入做某事"部分.但是当我接受回显的查询并在 phpMyAdmin 中执行它时,它按预期返回 1 个值.为什么?什么原因会导致这种行为?提前感谢您的建议.

                  I don't have problems with the connection or the permissions, because this code snippet is inside a loop and the other queries enter the "Do something" section. But when I take the echoed query and execute it in phpMyAdmin, it returns 1 value as expected. Why? What reasons can lead to this behavior? Thanks in advance for any advice.

                  推荐答案

                  我遇到了这个问题,发现这是因为我通过从 MS Word 直接复制/粘贴到数据库来破坏我的数据库.粘贴插入了特殊的斜撇号,PHPMYADMIN 显然可以解析但我的 php 代码不能.一旦我用标准的单引号替换了它们,一切都很好.

                  I had this problem and found that it was because I junked up my database by copy/pasting directly to the database from MS Word. Pasting had inserted special slanted apostrophes that PHPMYADMIN could apparently parse but my php code could not. Once I replaced those with a standard single quote, all was well.

                  这篇关于查询在 phpmyadmin 中有效,但在 PHP 脚本中无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Appending GET parameters to URL from lt;formgt; action(将 GET 参数附加到来自 lt;formgt; 的 URL行动)
                  Forcing quot;Save Asquot; dialog via jQuery GET(强制“另存为通过 jQuery GET 对话框)
                  PHP - get certain word from string(PHP - 从字符串中获取某个单词)
                  How to debug a get request in php using curl(如何使用 curl 在 php 中调试 get 请求)
                  get a # from a url in php(从 php 中的 url 获取 #)
                  PHP - include() file not working when variables are put in url?(PHP - 将变量放入 url 时,include() 文件不起作用?)

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

                      <bdo id='m55ea'></bdo><ul id='m55ea'></ul>
                          <tbody id='m55ea'></tbody>

                        <tfoot id='m55ea'></tfoot>

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