Skip to content

Commit 5ad9c28

Browse files
committed
Merge pull request a1phanumeric#14 from DjMomo/patch-1
Add CountRows method - seems legit :)
2 parents 98af6fb + 272075c commit 5ad9c28

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

class.MySQL.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,12 @@ function LastInsertID(){
311311
return mysql_insert_id();
312312
}
313313

314+
// Return number of rows
315+
function CountRows($from, $where=''){
316+
$result = $this->Select($from, $where, '', '', false, 'AND','count(*)');
317+
return $result["count(*)"];
318+
}
319+
314320
// Closes the connections
315321
function CloseConnection(){
316322
if($this->databaseLink){

0 commit comments

Comments
 (0)