【发布时间】:2017-10-25 03:24:49
【问题描述】:
我正在尝试从天际表中查找 user_id 等于 1 的支出及其关系。
我执行的代码是:
$user_payout = Payout::fromTable('skyrim')->where('user_id',1)->with('game','cluster')->first();
dd($user_payout);
它给了我这个错误:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'where user_id = ? limit 1' at line 1 (SQL: select * where user_id = 1 limit 1)
为什么这不起作用?
【问题讨论】: