:PDO pasar por aviso de referencia? Este
$stmt = $dbh->prepare("SELECT thing FROM table WHERE color = :color");
$stmt->bindParam(':color', $someClass->getColor());
$stmt->execute();
produce esto:
notificación en tiempo de ejecución
Sólo las variables deben ser pasados por referencia
aunque todavía se ejecuta.
Este:
$stmt = $dbh->prepare("SELECT thing FROM table WHERE color = :color");
$tempColor = $someClass->getColor();
$stmt->bindParam(':color',$tempColor);
$stmt->execute();
carreras sin queja.
No entiendo la diferencia?