mysql 中的更新语句不起作用,但它必须起作用 [英] Update statement in mysql not working, while it has to work

查看:48
本文介绍了mysql 中的更新语句不起作用,但它必须起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Mysql 中的更新语句有问题.这是我的声明:

I have a problem with an update statement in Mysql. Here is my statement:

update `momtos_kullanici` set `firma_quantity`='1', `auditor_quantity`='1', `print_word`=0, `print_excel`=0 WHERE `MK_ID`='2690'

此代码是通过 PHP 执行的,它不会更改值.我回应了它并将它复制到 phpmyadmin 面板,它仍然返回0行受影响"消息,但是如果我在 print_wordprint_excel 列值中重新键入 0 和 1phpmyadmin,它有效.

This code is executed through PHP and it is not changing the values. I echod it and copied it to phpmyadmin panel and still it is returning '0 rows affected' message, but if I retype the 0 and 1 in print_word and print_excel columns values in phpmyadmin, it works.

Column           Type     null   default

auditor_quantity int(11)  No    1

firma_quantity   int(11)  No    1

print_word       bit(1)   No    0

print_excel      bit(1)   No    0

我试着把数字放在引号里,甚至是真假词,同样的事情.我之前在 varchar 字段中遇到过同样的问题.那个时候,我只是说哦,好吧……",但这个真的很疯狂.

I tried to put number in quotes and even true and false words, the same thing. I faced with the same problem with varchar field before. In that time, i just said 'oh well...', but this one is really nuts.

谁能帮帮我?有什么我遗漏的吗?

Can any one help me? Is there something that I am missing?

推荐答案

update momtos_kullanici set firma_quantity=1, auditor_quantity=1, print_word=0, print_excel=0 WHERE MK_ID=2690

这篇关于mysql 中的更新语句不起作用,但它必须起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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