Просмотр исходного кода

:bug: 单词end 后面带有@时sql查询报错

visuddhinanda 3 лет назад
Родитель
Сommit
3f436492ba
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      app/Http/Controllers/CorpusController.php

+ 2 - 2
app/Http/Controllers/CorpusController.php

@@ -79,8 +79,8 @@ class CorpusController extends Controller
         $record = Sentence::select($this->selectCol)
         ->where('book_id',$sentId[0])
         ->where('paragraph',$sentId[1])
-        ->where('word_start',$sentId[2])
-        ->where('word_end',$sentId[3])
+        ->where('word_start',(int)$sentId[2])
+        ->where('word_end',(int)$sentId[3])
         ->whereIn('channel_uid',$channels)
         ->get();
         Log::info("sent count:".count($record));