Mysql
 sql >> Database >  >> RDS >> Mysql

Come utilizzare le istruzioni preparate in Zend Framework

$sql = "SELECT * FROM table_name WHERE id = :id ";

$stmt  = Zend_Registry::get("db")->prepare($sql);

$data=array(array('id'=> $id);

$stmt->execute($data);

print_r($stmt->fetchAll());