laravelについての質問です。
Controllerでcreateメソッドを使っていて今までは問題なく動いていたのですが、突然エラーを出すようになってしまいました。ご教授お願いいたします。
SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name 'example' select count(*) as aggregate from `example `where `name` = a
* @throws \Illuminate\Database\QueryException */ protected function runQueryCallback($query, $bindings, Closure $callback) { // To execute the statement, we'll simply call the callback, which will actually // run the SQL against the PDO connection. Then we can calculate the time it // took to execute and log the query SQL, bindings and time in our memory. try { return $callback($query, $bindings); } // If an exception occurs when attempting to run a query, we'll format the error // message to include the bindings with SQL, which will make this exception a // lot more helpful to the developer instead of just the database's errors. catch (Exception $e) { throw new QueryException( $query, $this->prepareBindings($bindings), $e ); } } /** * Log a query in the connection's query log. * * @param string $query * @param array $bindings * @param float|null $time * @return void */
tableの設定などは動いていた時から変わっておらず、キャッシュとかの関係なのかな、と思い消してみましたが変わりませんでした。
一時テーブルとかでしょうか。
ものすごく長い名前とか。
エラーは基本略さず訳さず提示を。
あと、コードやテーブル定義など一通りあったほうが良いです。他者が
回答1件
あなたの回答
tips
プレビュー