12 years, 11 months ago. it’s for php to know how to handle the parameters, %d – the argument is treated as an integer, and presented as a (signed) decimal number. %s – the argument is treated as and presented as a string. in your examples, $slug is a string and $this->id is an integer.
What does %s mean in MySQL?
%s is a placeholder used in functions like sprintf.
What does %d mean in MySQL?
those are placeholder parameters and it is the preferred way to construct sql-queries. %s can subsitute strings, %d decimals etc.
What is signed and unsigned integer in MySQL?
The signed range is -2147483648 to 2147483647 . The unsigned range is 0 to 4294967295 . This type is a synonym for INT . A large integer.