Skip to content

Commit d7e5749

Browse files
committed
c
1 parent ca3d086 commit d7e5749

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

Query.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ public function setWhere($wh)
1717
return $this;
1818
}
1919

20+
public function getWhere()
21+
{
22+
if (!$this->where)
23+
{
24+
$this->where = Where::init("AND");
25+
}
26+
27+
return $this->where;
28+
}
29+
2030
public function field($field, $alias = "")
2131
{
2232
if (!$alias)
@@ -28,6 +38,11 @@ public function field($field, $alias = "")
2838
return $this;
2939
}
3040

41+
public function getFields()
42+
{
43+
return $this->fields;
44+
}
45+
3146
public function order($field, $order = "ASC")
3247
{
3348
$this->orders[$field] = $order;
@@ -71,9 +86,10 @@ public function get()
7186
$wh = "";
7287
if ($this->where)
7388
{
74-
$wh = " WHERE " . $this->where->get($table_alias . ".");
89+
$wh = " WHERE " . $this->where->get($table_alias);
7590
}
7691

92+
7793
$list = array();
7894
$order = "";
7995
foreach($this->orders as $field => $dir)

0 commit comments

Comments
 (0)