update table set col = col + 1 where id = 22 and @value := col;php该如何得到value的值呢?
回复内容:
如题,例如sql:update table set col = col + 1 where id = 22 and @value := col;
php该如何得到value的值呢?
是否应该是 and col=@value ?确定一条记录后,更新对应的值
你可以执行一条sql的返回结果就能获取到变量的值
select @value;