Studyon Minte9.com
ZF 1.0




Insert query



$data = array(
   'letter' => $this->_params['letter'],
   'species' => $this->_params['species'],
);

$fields = join(",", array_keys($data));
$values = join("','", array_values($data));

$query = "INSERT INTO christmasletter ({$fields}) VALUES ('{$values}')";

$myModel->getAdapter()->query($query);