Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL: What does the equal colon =: mean in an update statement?

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?

like image 864
Ruben Avatar asked May 01 '12 05:05

Ruben


1 Answers

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

like image 153
Patrick Moore Avatar answered Oct 11 '22 09:10

Patrick Moore