3
To record some dates in the database in the desired format I am doing so:
mysqli_stmt_bind_param
(
$stmt,
's',
date("Y-m-d", strtotime($data))
);
Or, to catch the present day, simply:
mysqli_stmt_bind_param
(
$stmt,
's',
date("Y-m-d")
);
However, despite recording normally, I get this error (notice right?):
Strict standards: Only variables should be passed by Reference in line "5" // is on the date line...
Is this way of passing the value to the field wrong? What is the correct one? What does this error mean?
Ah, got it, thanks!
– gustavox
@gustavox, this shouldn’t even work is all that’s in the line of error?
– rray
That’s all...
– gustavox
This question of mine is related, gives one in the comments of the answer accepted (whose solution I did not follow hehe)...
– gustavox
@gustavox, tested here worked (inserted) with a function return (which should not) already with a direct past value he did not Insert. I’ll see later because this behavior works, The idea is just to pass variables even :P.
– rray
hehe, I’ll fix here :-) thanks!
– gustavox
@Gustavox, there are some articles here on mysqi/Pdo and an improved class for making queries was that Soen user who did, it is worth taking a look.
– rray