I am connecting to prepared statments
to insert many variables, and in some cases it takes a long time to find the errors, and now I packed in one here and hit me a doubt:
Blanks make a difference, I can break lines and give spaces quietly?
For example, I can do:
mysqli_stmt_bind_param($stmt,
'sisss
siiii
iissi
Or it has to be:
mysqli_stmt_bind_param($stmt, 'sissssiiiiiissi ....
Same for variables and field declaration. I'm putting 3 in 3 in each line for everything, to make it easier to count and to visualize the lack of some variable etc ...
$sql = "INSERT INTO tabela(
campo1, campo2, campo3,
campo4, campo5, campo6 ....
Only the values
that putting 10 out of 10:
VALUES
(
?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ....
In the case of the error in question, I checked it a million times, so I know that nothing is missing, everything has 138oooo !! (: /) So I think there must be some mistake in the indentation, because there are spaces and breaks of too many lines ...
The error is as follows:
Is there any way to know at least what is the difference, if one of a field or 20?)"Number of elements in type definition string does not match number of bind variables "
So here in the case the question is: can the blanks be affecting the code? How does PHP interpret white space within the script (I searched, but I only find explanations about number of bind variables
:): /)?