#1 aapill
我读出一个列表,然后单个读出其中的信息,用SPEEDPHP如何传递参数ID呢,请大家纠正一下,我知道下面程序肯定不错,请大家改正一下class main extends spController
{
function index(){
$this->display('index.html');
}
function customer_info(){
$customerinfo=spClass('customerinfo');
mysql_query('set names gbk');
$this->result=$customerinfo->findAll();
$contentsurl = spUrl("main", "customer_banner", array('id'=>$result['id']));
$this->display('customer_info.html');
}
function customer_banner(){
$id = $this->spArgs("id");
$customer_banner = spClass("customerinfo"); // 还是用spClass
$conditions = array('id'=>$id); // 制造查找条件,这里是使用ID来查找属于ID的那条留言记录
$result = $customer_banner->find($conditions); // 这次是用find来查找,我们把$condition(条件)放了进去
$this->display("customer_banner.html");
}
}
如何将CUSTOMER_INFO中FINDALL的参数传递到customer_banner中呢!在customer_banner.html中显示内容呢
2010-08-02 10:35:39