MySQL:在更新语句中,等号冒号=:是什么意思? [英] MySQL: What does the equal colon =: mean in an update statement?

查看:844
本文介绍了MySQL:在更新语句中,等号冒号=:是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了以下MySQL查询:

I came across the following MySQL query:

update 'table' set itemId=:itemId, startDate=:startDate where id=:id

但是我不知道=:是什么意思.我认为=:之后的名称是一个变量,但随后如何检查其中的内容或如何设置呢?

However I could not figure out what the =: means. I think that the name after the =: is a variable but then how to check what's inside or how is it set?

推荐答案

这很可能引用了绑定变量.执行MySQL语句的PHP或其他代码将引用替换为变量.

That is likely referencing a bind variable. The PHP or other code that executes the MySQL statement replaces the reference with a variable.

这篇关于MySQL:在更新语句中,等号冒号=:是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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