UPDATE cell to be empty MYSQL PHP

吃可爱长大的小学妹 提交于 2019-12-06 13:31:18

you should know that empty string '' is not same as space string ' ' and not same as NULL value.

to update the cell value to empty string :

mysql_query("UPDATE table SET cellname = '' WHERE id = '$idneeded'");
UPDATE table SET cellname = ' ' WHERE id = '$idneeded'
                            ^^^---not empty. spaces are not "empty".

Try

cellname=''

or

cellname=NULL

instead.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!