Changeset 63

Show
Ignore:
Timestamp:
06/14/08 09:43:07 (7 months ago)
Author:
scott
Message:

kill numRows since its implementation is debatable

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/sqlite3.c

    r62 r63  
    446446                case SQLITE_ROW: /* Valid Row */ 
    447447                { 
     448#ifdef scottmac_0 
    448449                        /* loop through to fill numRows */ 
    449450                        do 
     
    451452                                result->num_rows++; 
    452453                        } while (sqlite3_step(*(result->intern_stmt)) == SQLITE_ROW); 
     454#endif 
    453455                } 
    454456                /* No break is intentional */ 
     
    12181220        switch (return_code) { 
    12191221                case SQLITE_ROW: /* Valid Row */ 
     1222#ifdef scottmac_0 
    12201223                        /* loop through to fill numRows */ 
    12211224                        do 
     
    12231226                                num_rows++; 
    12241227                        } while (sqlite3_step(internp->stmt) == SQLITE_ROW); 
    1225  
     1228#endif 
    12261229                case SQLITE_DONE: /* Valid but no results */ 
    12271230                { 
     
    13931396/* }}} */ 
    13941397 
     1398#ifdef scottmac_0 
    13951399/* {{{ proto bool SQLite3_result::numRows() 
    13961400        Returns the number of rows in a result set 
     
    14061410        } 
    14071411        RETURN_LONG(internp->num_rows); 
    1408 }                                        
    1409 /* }}} */ 
     1412
     1413/* }}} */ 
     1414#endif 
    14101415 
    14111416/* {{{ proto bool SQLite3_result::finalize() 
     
    15721577ZEND_END_ARG_INFO() 
    15731578 
     1579#ifdef scottmac_0 
    15741580static 
    15751581ZEND_BEGIN_ARG_INFO(arginfo_sqlite3_result_numrows, 0) 
    15761582ZEND_END_ARG_INFO() 
     1583#endif 
    15771584 
    15781585static 
     
    16281635        PHP_ME(sqlite3_result, fetchArray,              arginfo_sqlite3_result_fetcharray, ZEND_ACC_PUBLIC) 
    16291636        PHP_ME(sqlite3_result, reset,                   arginfo_sqlite3_result_reset, ZEND_ACC_PUBLIC) 
     1637#ifdef scottmac_0 
    16301638        PHP_ME(sqlite3_result, numRows,                 arginfo_sqlite3_result_numrows, ZEND_ACC_PUBLIC) 
     1639#endif 
    16311640        PHP_ME(sqlite3_result, finalize,                arginfo_sqlite3_result_finalize, ZEND_ACC_PUBLIC) 
    16321641 
  • trunk/tests/sqlite3_11_numrows.phpt

    r55 r63  
    22SQLite3::prepare number of rows 
    33--SKIPIF-- 
    4 <?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> 
     4<?php require_once(dirname(__FILE__) . '/skipif.inc'); 
     5// Create an instance of the ReflectionMethod class 
     6try { 
     7        $method = new ReflectionMethod('sqlite3_result', 'numRows'); 
     8} catch (ReflectionException $e) { 
     9        die("skip"); 
     10
     11?> 
    512--FILE-- 
    613<?php