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

      1. <tfoot id='lM6Ex'></tfoot>
      2. <small id='lM6Ex'></small><noframes id='lM6Ex'>

        <legend id='lM6Ex'><style id='lM6Ex'><dir id='lM6Ex'><q id='lM6Ex'></q></dir></style></legend>
      3. 使用 php pdo 删除我的数据库中的行

        时间:2023-10-05

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

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

                    <tbody id='foPA0'></tbody>

                  <legend id='foPA0'><style id='foPA0'><dir id='foPA0'><q id='foPA0'></q></dir></style></legend>
                • <small id='foPA0'></small><noframes id='foPA0'>

                  本文介绍了使用 php pdo 删除我的数据库中的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我试图删除我数据库中的一行,同时从 url 获取它的 id例如 exmaple.com/deleteTeam.php?Id=?<<this is the selected id from radio button option and it will be equal to number when selected like Id=1.

                  i am trying to delete a row in my database while getting it's id from the url for exmaple exmaple.com /deleteTeam.php?Id=? << this is the selected id from radio button option and it will be equal to number when selected like Id=1.

                  include ('connnect.php'); 
                  // this connect my database and working
                  $command = "DELETE * FROM SoccerPoll WHERE Id=?";
                  $stmt = $dbh ->prepare($command);
                  $stmt->execute($_GET['Id']);
                  

                  推荐答案

                  您可以在尝试执行查询之前使用 bindParam 或 bindValue.

                  You can use bindParam or bindValue before trying to execute que query.

                  $command = " DELETE FROM SoccerPoll WHERE Id=:id LIMIT 1";
                  $stmt = $dbh ->prepare($command);
                  $stmt->bindParam(':id', $_GET['Id'], PDO::PARAM_INT);
                  $stmt->execute();
                  

                  这篇关于使用 php pdo 删除我的数据库中的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:PDO 全局实例 新的 PDO ,它可能吗? 下一篇:PDO fetch 只返回第一行

                  相关文章

                  最新文章

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

                  • <bdo id='kakuN'></bdo><ul id='kakuN'></ul>

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