-2

PDOStatement::bindParam supports the following variables in prepared statements:

  • i = integer
  • d = double
  • s = string
  • b = blob

I know that if it i the value should be a number, if it s then it is a string, what are blob and double?

cweiske
  • 30,033
  • 14
  • 133
  • 194
Basic
  • 1,818
  • 5
  • 21
  • 31
  • possible duplicate of [What is a Blob?](http://stackoverflow.com/questions/5414551/what-is-it-exactly-a-blob-in-a-dbms-context) – Gordon Apr 14 '11 at 12:32
  • possible duplicate of [Difference between float and double](http://stackoverflow.com/questions/2160810/mysql-whats-the-difference-between-float-and-double) – Gordon Apr 14 '11 at 12:34

3 Answers3

1

"Double" is a float with double precision. "blob" is a "Binary Large OBject" (for example a file).

KingCrunch
  • 128,817
  • 21
  • 151
  • 173
1

integer :0 , -10, 20, 50 (ahem, a integer)

double :0.5, -20.5 (aka decimal number)

string :"some text","b" (but it is limited to aprox. 65k characters 255 character for mysql 5.0 and early)

blob :binary information, it is unlimited , it can be a string or a binary representation.

magallanes
  • 6,583
  • 4
  • 54
  • 55
0

I find questions like this irritating/lazy

It's all described in MySQL's manual:

http://dev.mysql.com/doc/refman/5.0/en/blob.html

http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html

An overview of all the different datatypes is given here: http://dev.mysql.com/doc/refman/5.0/en/data-types.html

James C
  • 14,047
  • 1
  • 34
  • 43