表记录未使用prepare和execute更新 [英] Table record not updated using prepare and execute

查看:90
本文介绍了表记录未使用prepare和execute更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用php 5.3和MySQL 5.0


使用mysqli安装php pdo

所以我不能使用pdo语法



我有3个预备语句

1.一个用于查找

2.一个用于INSERT

3.一个用于UPDATE


前两个语句工作正常并按照它们的要求执行。


我已经在MySQL工作台上测试了更新语句,它在那里工作正常。此外,导致UPDATE的所有步骤和结果都按预期执行。


以下代码在执行时不会更新表记录。 $ result总是等于false。任何可用的帮助将不胜感激。

I am using php 5.3 and MySQL 5.0

The php is installed using mysqli not pdo
So I cannot use pdo syntax


I have 3 prepared statements
1. one for look up
2. one for INSERT
3. one for UPDATE

The first two statements work fine and execute as they are suppose to.

I have tested the update statement on the MySQL workbench and it works just fine there. Also all the steps and results leading up to the UPDATE execute as expected.


The following code does not update the table record when executed. The $result is always equal to false. Any usable help will be appreciated.

展开 | 选择 < span class =codeDivider> | Wrap | 行号

推荐答案

结果始终等于false。任何可用的帮助将不胜感激。

result is always equal to false. Any usable help will be appreciated.

展开 | 选择 < span class =codeDivider> | Wrap | 行号


我现在已确定标准


mysqli - >('''''')查询也不会从应用程序更新表。所以也许在使用多个准备语句时我有些不明白。


以下是我在应用程序中的全部代码。也许我需要在某处发表一个密切的声明。或什么?
mysqli->(''...'') query also does not update the table from the app. So perhaps there is something I do not understand in using multiple prepare statements.

Here is the entirety of my code in the apps. Perhaps I need a close statement somewhere. or something?
展开 | 选择 | Wrap | 行号


这篇关于表记录未使用prepare和execute更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆