您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

类写错了,如何只读一组数据

2024/3/1 16:22:55发布19次查看
类写错了,怎么只读一组数据
class_img.php
picinfo = mysql_fetch_array($result); //返回查询结果到数组
    $num_rows = mysql_num_rows($result);
mysql_query(set names utf8);
        mysql_close($conn); //关闭数据库连接 
        $this->getinfo($num_rows); //调用传递信息的方法.
    } 
    // 获取信息传递给属性的方法
private function getinfo($num_rows){ 
        $this->pid = $this->picinfo[pid]; 
        $this->b_img = $this->picinfo[b_img];
        $this->m_img = $this->picinfo[m_img];
$this->s_img = $this->picinfo[s_img];
$this->indicate = $this->picinfo[indicate];
$this->type = $this->picinfo[type];
    $this->row = $this->picinfo['row']=$num_rows;
    }
//返回每个属性的public 方法. 
   public function getrow(){
return $this->row; 
    } 
    public function getpid(){
return $this->pid; 
    }
public function getb_img(){ 
        return $this->b_img; 
    }
public function getm_img(){ 
        return$this->m_img; 
    } 
  public function gets_img(){ 
        return$this->s_img; 
    } 
  public function getindicate(){ 
        return$this->indicate; 
    } 
  public function gettype(){ 
        return$this->type; 
    }
}
class edit_img
{
public function edit_img($sql)
{
          require_once(db_config.php); //包含配置信息.
$result= mysql_query($sql,$conn); // 执行查询语句
      $row=mysql_affected_rows(); //返回查询结果到数组
if($row {
echo ;
}
else{
echo 有.$row.组数据受到影响;

该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product