Skip to content

Commit e648fef

Browse files
committed
Added COUNT
1 parent 6763f4f commit e648fef

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Count.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ class Count extends Selector {
77
$query,
88
$con;
99

10-
function __construct($that, $select, $con) {
10+
function __construct($that, $con) {
1111
$this->that = $that;
1212
$this->con = $con->getObject();
1313
$this->query = 'SELECT COUNT(*) as count FROM '.$this->that->_table_name_;
1414
}
1515

16-
1716
function get() {
1817
return $this->con->query($this->query.';')->fetch()["count"];
1918
}
2019

21-
}
20+
}

Table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,6 @@ function update($select = "*") {
7373

7474
function count() {
7575
$con = $this->__databaseObj__->getObject();
76-
return (new Count($this, $select, $this->__databaseObj__));
76+
return (new Count($this, $this->__databaseObj__));
7777
}
78-
}
78+
}

0 commit comments

Comments
 (0)