weixin_41857626 2019-07-26 19:12 采纳率: 0%
浏览 567

微擎小程序sql,如何关联读取

微擎系统 下面SQL语句,如何读取(表名:ccshop_comshop_member)中的 telphone 字段

表名:ccshop_comshop_member 与 表名:ccshop_comshop_order 关联系字段 user_id

$sql = "select o.order_id,o.type,os.name as status_name from ".tablename('ccshop_comshop_order')." as o , {$join} 
           ".tablename('ccshop_comshop_order_status')." as os 
              where  o.uniacid=:uniacid and o.order_status_id = os.order_status_id {$where}  
              order by o.date_added desc limit {$offset},{$size}";

图片说明

  • 写回答

1条回答 默认 最新

  • juanmao_li 2019-07-30 15:25
    关注

    $sql = "SELECT telphone FROM ".tablename('ccshop_comshop_member');
    pdo_fetchall("SELECT * FROM " . tablename('ccshop_comshop_member') . " as ug left join ".tablename('ccshop_comshop_order')." as g on ug.user_id = g.user_id ");

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog