PHP/sqlite3 rowcount question
#2

I have fixed it fortunately.
If you may run into this problem. This is a fix:

PHP код:
<?php
    
function SqliteNumRows($query){
        
$numRows 0;
        while(
$rows $query->fetchArray()){
            ++
$numRows;
        }
        return 
$numRows;
    }
?>
$countrows = SqliteNumRows($stmt);
//edit: Otherwise it shows 4 instead of 5 when having 5 rows.
$countrows += 1;
Reply


Messages In This Thread
PHP/sqlite3 rowcount question - by jasperschellekens - 24.02.2018, 11:17
Re: PHP/sqlite3 rowcount question - by jasperschellekens - 24.02.2018, 11:34
Re: PHP/sqlite3 rowcount question - by kingmk - 24.02.2018, 11:41
Re: PHP/sqlite3 rowcount question - by jasperschellekens - 24.02.2018, 11:56
Re: PHP/sqlite3 rowcount question - by jasperschellekens - 24.02.2018, 12:56

Forum Jump:


Users browsing this thread: 2 Guest(s)