I get datetime from this way:
class DB_Functions extends DB_Connect{
private $dbConnect = "";
public $dtime;
public function __construct() {
$this->dbConnect = $this->pdo_connect();
$this->dtime = new DateTime();
}
public function destruct() {
$this->dbConnect = null;
}
public function exampleInsert() {
.
.
.
$result->bindParam(':dateCreation',$this->dtime->format("Y-m-d H:i:s"),PDO::PARAM_STR);
}
}
Then when I use dtime to insert in a table, like this:
Line 1708: $result->bindParam(':dateCreation',$this->dtime->format("Y-m-d H:i:s"),PDO::PARAM_STR);
Display this error:
<b>Strict Standards</b>: Only variables should be passed by reference in <b>include\DB_Functions.php</b> on line <b>1708</b><br />
My declaration to get datetime is wrong?