gpt4 book ai didi

php - mysql/php中字段默认值的增加

转载 作者:行者123 更新时间:2023-11-29 05:29:38 25 4
gpt4 key购买 nike

$saa = "update  aspirantdt set vote = 'vote'+1 where 'post_id' = '$id' ";

当我检查数据库时,值没有增加。帮帮我。

最佳答案

你的 update 中有一个语法 错误查询,您使用的是引号而不是反引号。对列名使用反引号,对值使用引号尝试更改如下

$saa = "update  `aspirantdt` set `vote` = (`vote`+1) where `post_id` = '".$id."' ";

关于php - mysql/php中字段默认值的增加,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16118178/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com