//Introduce the Loader class (automatic loading class)
require_once("Zend/Loader.php");
//Use the Loader class to introduce a Db class
Zend_Loader::loadClass("Zend_Db" ; .0.1' ,
'username' => 'root' ,
'password' => '111' ,
'dbname' => 'test',
'profiler' = > "true"
);
//Tell the database and database configuration information operated by the Zend_Db class
$Db = Zend_Db::factory('PDO_Mysql', $Config);
// Execute the encoding statement
$Db -> query("set names utf8");
//------------------------ -----------------------
$Select = $Db ->select();
$Select -> from('sanguo' ,'*');
$Select -> join('dengji','sanguo.s_dengji = dengji.d_id');
$Select -> order('s_dengji asc');
$Reslut = $Db -> fetchAll($Select);
echo "
";
foreach ( $Reslut as $key => $value)
{
echo "";
foreach ($value as $key2 => $value2)
{
echo "" . $value2 . " | ";
}
echo "
";
}
echo "
";
?>