@@ -164,7 +164,8 @@ function_entry sqlite_functions[] = {
164
164
PHP_FE (sqlite_array_query , NULL )
165
165
PHP_FE (sqlite_single_query , NULL )
166
166
PHP_FE (sqlite_fetch_array , NULL )
167
- PHP_FE (sqlite_fetch_string , NULL )
167
+ PHP_FE (sqlite_fetch_single , NULL )
168
+ PHP_FALIAS (sqlite_fetch_string , sqlite_fetch_single , NULL )
168
169
PHP_FE (sqlite_fetch_all , NULL )
169
170
PHP_FE (sqlite_current , NULL )
170
171
PHP_FE (sqlite_column , NULL )
@@ -214,7 +215,7 @@ function_entry sqlite_funcs_db[] = {
214
215
215
216
function_entry sqlite_funcs_query [] = {
216
217
PHP_ME_MAPPING (fetch_array , sqlite_fetch_array , NULL )
217
- PHP_ME_MAPPING (fetch_string , sqlite_fetch_string , NULL )
218
+ PHP_ME_MAPPING (fetch_single , sqlite_fetch_single , NULL )
218
219
PHP_ME_MAPPING (fetch_all , sqlite_fetch_all , NULL )
219
220
PHP_ME_MAPPING (column , sqlite_column , NULL )
220
221
PHP_ME_MAPPING (changes , sqlite_changes , NULL )
@@ -234,7 +235,7 @@ function_entry sqlite_funcs_query[] = {
234
235
235
236
function_entry sqlite_funcs_ub_query [] = {
236
237
PHP_ME_MAPPING (fetch_array , sqlite_fetch_array , NULL )
237
- PHP_ME_MAPPING (fetch_string , sqlite_fetch_string , NULL )
238
+ PHP_ME_MAPPING (fetch_single , sqlite_fetch_single , NULL )
238
239
PHP_ME_MAPPING (fetch_all , sqlite_fetch_all , NULL )
239
240
PHP_ME_MAPPING (column , sqlite_column , NULL )
240
241
PHP_ME_MAPPING (changes , sqlite_changes , NULL )
@@ -1698,8 +1699,8 @@ PHP_FUNCTION(sqlite_array_query)
1698
1699
}
1699
1700
/* }}} */
1700
1701
1701
- /* {{{ php_sqlite_fetch_string */
1702
- static void php_sqlite_fetch_string (struct php_sqlite_result * res , zend_bool decode_binary , zval * return_value TSRMLS_DC )
1702
+ /* {{{ php_sqlite_fetch_single */
1703
+ static void php_sqlite_fetch_single (struct php_sqlite_result * res , zend_bool decode_binary , zval * return_value TSRMLS_DC )
1703
1704
{
1704
1705
const char * * rowdata ;
1705
1706
char * decoded ;
@@ -1805,7 +1806,7 @@ PHP_FUNCTION(sqlite_single_query)
1805
1806
1806
1807
while (rres -> curr_row < rres -> nrows ) {
1807
1808
MAKE_STD_ZVAL (ent );
1808
- php_sqlite_fetch_string (rres , decode_binary , ent TSRMLS_CC );
1809
+ php_sqlite_fetch_single (rres , decode_binary , ent TSRMLS_CC );
1809
1810
1810
1811
/* if set and we only have 1 row in the result set, return the result as a string. */
1811
1812
if (srow ) {
@@ -1830,7 +1831,7 @@ PHP_FUNCTION(sqlite_single_query)
1830
1831
1831
1832
/* {{{ proto string sqlite_fetch_array(resource result [, bool decode_binary])
1832
1833
Fetches first column of a result set as a string */
1833
- PHP_FUNCTION (sqlite_fetch_string )
1834
+ PHP_FUNCTION (sqlite_fetch_single )
1834
1835
{
1835
1836
zval * zres ;
1836
1837
zend_bool decode_binary = 1 ;
@@ -1849,7 +1850,7 @@ PHP_FUNCTION(sqlite_fetch_string)
1849
1850
ZEND_FETCH_RESOURCE (res , struct php_sqlite_result * , & zres , -1 , "sqlite result" , le_sqlite_result );
1850
1851
}
1851
1852
1852
- php_sqlite_fetch_string (res , decode_binary , return_value TSRMLS_CC );
1853
+ php_sqlite_fetch_single (res , decode_binary , return_value TSRMLS_CC );
1853
1854
}
1854
1855
/* }}} */
1855
1856
0 commit comments