$query1=$DB->query($sql1);
$query2=$DB->query($sql2);
$info_data=$DB->fetch_array($query1);
$user_data=$DB->fetch_array($query2); 明显是你的数据库有问题,这两个查询根本不相关,呵呵.从你的类里面下手.
$query2=$DB->query($sql2);
$info_data=$DB->fetch_array($query1);
$user_data=$DB->fetch_array($query2); 明显是你的数据库有问题,这两个查询根本不相关,呵呵.从你的类里面下手.
function fetch_array($query){
mysql_data_seek($query,0);
$this->data = array();
while($this->rows=mysql_fetch_array($query)){
$this->data[]=$this->rows;
}
return $this->data;
}
数据库是没问题,我想问题是出在类函数里
function fetch_array($query){
mysql_data_seek($query,0);
while($this->rows=mysql_fetch_array($query)){
$this->data[]=$this->rows;
}
return $this->data;
}
怎样转换结果集时从0开始,而不是从上一个数组的结束出继续
function fetch_array($query)
{
$this->data = array();
mysql_data_seek($query,0);
while($this->rows=mysql_fetch_array($query)){
$this->data[]=$this->rows;
}
return $this->data;
}