ソースを参照

Fix minor sql errors reported in issue 266.

Mark Crane 13 年 前
コミット
9b7d8c5e8c
1 ファイル変更3 行追加3 行削除
  1. 3 3
      includes/classes/database.php

+ 3 - 3
includes/classes/database.php

@@ -209,7 +209,7 @@ include "root.php";
 						$this->connect();
 					}
 				//get data from the database
-					$sql = " select * from ".$this->table." ";
+					$sql = "select * from ".$this->table." ";
 					if ($this->where) {
 						$i = 0;
 						foreach($this->where as $row) {
@@ -256,7 +256,7 @@ include "root.php";
 					}
 				//add data to the database
 					$sql = "insert into ".$this->table;
-					$sql .= "(";
+					$sql .= " (";
 					$i = 1;
 					foreach($this->fields as $name => $value) {
 						if (count($this->fields) == $i) {
@@ -372,7 +372,7 @@ include "root.php";
 						$this->connect();
 					}
 				//get the number of rows
-					$sql = " select count(*) as num_rows from ".$this->table;
+					$sql = "select count(*) as num_rows from ".$this->table." ";
 					if ($this->where) {
 						$i = 0;
 						foreach($this->where as $row) {