【问题标题】:laravel getting error on using alias in joins 4.1laravel 在连接 4.1 中使用别名时出错
【发布时间】:2017-04-04 10:37:42
【问题描述】:

出现 ORA-00905 错误:laravel 4.1 中缺少关键字位置

->leftjoin('table1','table1.portid','=','ordertable.order_id')

->leftjoin('table2 as dep','dep.portid','=','ordertable.departure')

->leftjoin('table2 as arr','arr.portid','=','ordertable.arrival')

在使用别名连接 2(table2 作为 dep)和 3(table2 作为 arr)时出现错误,有人可以告诉我必须在哪里使用 as,语法 V4.1 是否正确

【问题讨论】:

  • 相同的查询在 5.2 中对我有用 :(

标签: laravel laravel-4


【解决方案1】:

按原样删除

->leftjoin('table1','table1.portid','=','ordertable.order_id')

->leftjoin('table2 dep','dep.portid','=','ordertable.departure')

->leftjoin('table2 arr','arr.portid','=','ordertable.arrival')

【讨论】:

    猜你喜欢
    • 2021-01-04
    • 1970-01-01
    • 2014-06-20
    • 2018-11-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多