ID:               49303
 Updated by:       scott...@php.net
 Reported By:      rene at 809estudio dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         SQLite related
 Operating System: Windows Vista Home Premium
 PHP Version:      5.3.0
 New Comment:

SQLite and SQLite3 have different APIs.

SQLite3 doesn't implement buffered results so the total number of
results isn't available. This is down to the fact that libsqlite really
doesn't implement it either and its emulated by the old SQLite
extension.


Previous Comments:
------------------------------------------------------------------------

[2009-08-20 06:57:33] rene at 809estudio dot com

Description:
------------
PHP's SQLite library possesed a function called
sqlite_num_rows($result) which would return the number of rows present
in a result from a query. This method is not implemented in the
SQLiteResult class even if the documentation hints that it exists.

http://www.php.net/manual/en/function.sqlite-num-rows.php

This is a core function which should not be overlooked.

Reproduce code:
---------------
<?php
   $db = new SQLite3('databaseName');

   $result = $db->query('SELECT * FROM tableName');

   echo "Number of rows : ".$result->numRows();
?>

Expected result:
----------------
Number of rows: 100

Actual result:
--------------
Fatal error: Call to undefined method SQLite3Result::numRows() in
{file} on line {line}


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49303&edit=1

Reply via email to