Ok. bindParam binds a variable to a given placeholder. That variable is not evaluated at that time, instead, it is bind by reference.
This means that, since it's not evaluated at that time, we actually don't have access to that variable value, so, we can't concatenate nothing to it.
It's bind by reference, so unless the reference is changed, we cannot modify it's value, because we don't have access to it, and we shouldn't. Because, if we had, we will defeat the all propose of reference? (I'm still shacking here...).
So, we should first do:
$preparedVariable = '%'.$something->getSomething().'%';
And then bind that preparedVariable.
Because, by doing so, we are respecting the reference requirement of bindParam. We are referring (and NOT access the value) of a given variable.
If the above is precise:
Should we use bindValue or bindParam - probably this doesn't matter here, and will only manner if we deal with stored procedures? (I don't wish to disguise: I'm absolutely unaware of what stored procedures are, but that's not the point here, I've just read that on php manual).
Thanks a lot,