瀏覽代碼

_TABLE_PALI_TEXT_

visuddhinanda 4 年之前
父節點
當前提交
cd15c417c5
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      public/app/db/pali_text.php

+ 2 - 2
public/app/db/pali_text.php

@@ -66,7 +66,7 @@ class PaliText extends Table
 				}
 				}
 			}
 			}
 			$title="";
 			$title="";
-			$query = "select * from pali_text where book = ? and paragraph = ?";
+			$query = "SELECT * from "._TABLE_PALI_TEXT_." where book = ? and paragraph = ?";
 			$stmt = $this->dbh->prepare($query);
 			$stmt = $this->dbh->prepare($query);
 			$stmt->execute(array($book,$para));
 			$stmt->execute(array($book,$para));
 			$result = $stmt->fetch(PDO::FETCH_ASSOC);
 			$result = $stmt->fetch(PDO::FETCH_ASSOC);
@@ -75,7 +75,7 @@ class PaliText extends Table
 					$title= $result["toc"];
 					$title= $result["toc"];
 				}
 				}
 				else{
 				else{
-					$query = "select * from pali_text where book = ? and paragraph = ?";
+					$query = "SELECT * from "._TABLE_PALI_TEXT_." where book = ? and paragraph = ?";
 					$stmt = $this->dbh->prepare($query);
 					$stmt = $this->dbh->prepare($query);
 					$stmt->execute(array($book,$result["parent"]));
 					$stmt->execute(array($book,$result["parent"]));
 					$result = $stmt->fetch(PDO::FETCH_ASSOC);
 					$result = $stmt->fetch(PDO::FETCH_ASSOC);