All pastes #730675 Raw Edit

Miscellany

public php v1 · immutable
·published 2007-10-09 12:48 UTC
rendered paste body
WORKS: (inserts 'test1' for department)<?php        $department = null;        $stmt = $db->prepare("INSERT INTO product (department) VALUES (?)");        $stmt->bindParam(1, &$department);        $department = 'test1';        $stmt->execute();?>DOESN'T WORK:  (inserts null for depertment ) <?php// As shown in the PHP manual        $department = null;        $stmt = $db->prepare("INSERT INTO product (department) VALUES (?)");        $stmt->bindParam(1, $department);        $department = 'test1';        $stmt->execute();?>