Ver Fonte

:bug: 单句数据库检索 有时返回空白字符串

visuddhinanda há 5 anos atrás
pai
commit
18904630d1
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      app/term/note.php

+ 1 - 1
app/term/note.php

@@ -56,7 +56,7 @@ $tran="";
 $db_file=_FILE_DB_SENTENCE_;
 $db_file=_FILE_DB_SENTENCE_;
 try{
 try{
 	PDO_Connect("sqlite:$db_file");
 	PDO_Connect("sqlite:$db_file");
-	$query="select * from sentence where book='{$bookId}' and paragraph='{$para}' and begin='{$begin}' and end='{$end}' order by modify_time DESC ";
+	$query="SELECT * FROM sentence WHERE book='{$bookId}' AND paragraph='{$para}' AND begin='{$begin}' AND end='{$end}'  AND text <> '' order by modify_time DESC limit 0 ,1 ";
 	$Fetch = PDO_FetchAll($query);
 	$Fetch = PDO_FetchAll($query);
 	$iFetch=count($Fetch);
 	$iFetch=count($Fetch);
 	if($iFetch>0){
 	if($iFetch>0){