Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 272075c

Browse files
committed
Add CountRows method
1 parent 98af6fb commit 272075c

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)

AltStyle によって変換されたページ (->オリジナル) /