Browse Source

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

visuddhinanda 3 years ago
parent
commit
3f436492ba
1 changed files with 2 additions and 2 deletions
  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));