For PDO::query(), I honestly don’t know (I do not use it), but for PDOStatement::bindValue(), although the default is string, it’s possible to give it a parameter to determine its type and I strongly recommend that! Why should something which should be of a numeric type be a string?