【问题标题】:Not unique table/alias: table name非唯一表/别名:表名
【发布时间】:2012-04-23 13:05:09
【问题描述】:

我收到错误错误号:1066

不唯一的表/别名:'fixed_asset_reissue'

SELECT * FROM 
(`fixed_asset_reissue`, `fixed_asset_reissue`) 
RIGHT JOIN `fixed_asset_distribution` ON 
`fixed_asset_distribution`.`fixed_asset_list_id`=
`fixed_asset_reissue`.`fixed_asset_list_id` 
WHERE `customer` = 'R/00567/00'

代码是

$get2= $this->db->select('*')
           ->from('fixed_asset_reissue')
           ->join('fixed_asset_distribution','fixed_asset_distribution.fixed_asset_list_id=fixed_asset_reissue.fixed_asset_list_id','right')
            ->where('customer',$cust_id);
    $data['reissue']=$get1->get('fixed_asset_reissue')->result();

【问题讨论】:

    标签: mysql sql codeigniter


    【解决方案1】:

    从获取声明或从声明中删除此“fixed_asset_reissue”表格。这就是问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-09-08
      • 1970-01-01
      • 1970-01-01
      • 2016-04-24
      • 2019-04-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多