Skip to content

Commit 6763f4f

Browse files
committed
Added Count
1 parent 856418f commit 6763f4f

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

Count.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,6 @@ function __construct($that, $select, $con) {
1414
}
1515

1616

17-
function limit($limit) {
18-
$this->query .= 'LIMIT '.$limit;
19-
return $this;
20-
}
21-
22-
function order($order) {
23-
$this->query .= 'ORDER BY '.$order;
24-
return $this;
25-
}
26-
27-
2817
function get() {
2918
return $this->con->query($this->query.';')->fetch()["count"];
3019
}

Table.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ function setDatabase(string $database){
4646
$this->__database__ = $database;
4747
}
4848

49+
4950
function getObject() {
5051
return $this->__databaseObj__->getObject();
5152
}
@@ -69,4 +70,9 @@ function update($select = "*") {
6970
$con = $this->__databaseObj__->getObject();
7071
return (new Update($this, $select, $this->__databaseObj__));
7172
}
72-
}
73+
74+
function count() {
75+
$con = $this->__databaseObj__->getObject();
76+
return (new Count($this, $select, $this->__databaseObj__));
77+
}
78+
}

0 commit comments

Comments
 (0)