]> git.pld-linux.org Git - packages/php-sqlite3.git/blob - php-sqlite3-new-functions.patch
- tabs in preamble
[packages/php-sqlite3.git] / php-sqlite3-new-functions.patch
1 --- php_sqlite3.c.org   2006-12-10 00:24:16.069685500 +0100
2 +++ php_sqlite3.c       2006-12-10 00:25:21.741789750 +0100
3 @@ -805,6 +805,26 @@
4  }
5  /* }}} */
6  
7 +/* }}} 
8 +   {{{ integer sqlite3_total_changes(resource sqlite3)
9 +   return  the number of database rows
10 +*/
11 +
12 +PHP_FUNCTION(sqlite3_total_changes)
13 +{
14 +  php_sqlite3_resource* me;
15 +  zval* z_rs;
16 +  
17 + if(ZEND_NUM_ARGS() != 1) WRONG_PARAM_COUNT;
18 +  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,"r", &z_rs)==FAILURE)
19 +    return;
20 +
21 +  ZVAL_TO_S3_HANDLE (me, &z_rs);  
22
23 + RETURN_LONG(sqlite3_total_changes (me->handle));
24 +}
25 +/* }}} */
26 +
27  
28  /* {{{ void void php_sqlite3_user_function_cb(sqlite3_context*,int nargs,sqlite3_value**)
29   * callback function, for user-defined SQL functions. Get called by sqlite3 library
30 --- php_sqlite3.h.org   2006-12-10 00:24:18.489836750 +0100
31 +++ php_sqlite3.h       2006-12-10 00:24:36.310950500 +0100
32 @@ -18,6 +18,7 @@
33  PHP_FUNCTION(sqlite3_exec);
34  PHP_FUNCTION(sqlite3_query);
35  PHP_FUNCTION(sqlite3_changes);
36 +PHP_FUNCTION(sqlite3_total_changes);
37  
38  PHP_FUNCTION(sqlite3_bind_int);
39  PHP_FUNCTION(sqlite3_bind_double);
This page took 0.107925 seconds and 3 git commands to generate.