All pastes #730642 Raw Edit

Miscellany

public php v1 · immutable
·published 2007-10-09 12:25 UTC
rendered paste body
WORKS:<?php        $department = null;        $stmt = $db->prepare("INSERT INTO product (department) VALUES (?)");        $stmt->bindParam(1, &$department);        $department = 'test1';        $stmt->execute();?>DOESN'T WORK:<?php        $department = null;        $stmt = $db->prepare("INSERT INTO product (department) VALUES (?)");        $stmt->bindParam(1, $department);        $department = 'test1';        $stmt->execute();?>