Fix minor sql errors reported in issue 266.

This commit is contained in:
Mark Crane
2012-06-14 17:32:41 +00:00
parent 5e63e29d02
commit 5979fff05c
2 changed files with 17 additions and 17 deletions

View File

@@ -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) {