|
To use Multiple primary key in 'Zend Db Table Abstract' model we must use a $primary protected array like i made in the next attach model:: Per usare chiavi primarie multiple in un modello di tipo 'Zend Db Table Abstract' dobbiamo usare come chiave $primary protected un arry come è stato fatto nel modello che incollo di seguito:: MatchingFigure.php <?php
class MatchingFigure extends Zend_Db_Table_Abstract { protected $_name = 'matching_figure'; protected $_primary = array('cod_figure', 'cod_consul');
}
?> To use the find default 'Zend Db Table ' function we must pass multiple primary value as the follow: Zend_Loader::loadClass('MatchingFigure'); $MatchingFigure=new MatchingFigure; $MatchingFigureRows=$MatchingFigure->find('255','carlo'); and print it to video screen MatchingFigureRows=MatchingFigureRows->toArray(); zend_debug::dump($MatchingFigureRows); Per usare la funzione di default find di 'Zend Db Table ' dobbiamo passare multipli valori primari come fatto sopra...ed eventualmente stampare a video i valori!
|