I currently use Zend_Db to manage my queries
$stmt = $db->prepare("INSERT INTO test (ID_Test) VALUES (:ID)");
$stmt->bindParam(':ID', 4, PDO::PARAM_INT);
$stmt->execute();
But this does seem to work throwing an error “Fatal error: Cannot pass parameter 2 by reference”
What am I doing wrong?
bindParam wants parameter two to be a variable, so it can reference or “link to” the variable instead of copying it, making it better for larger variables but annoying in your case, try: