Back to index

php5  5.3.10
mysqli_prop.c
Go to the documentation of this file.
00001 /*
00002   +----------------------------------------------------------------------+
00003   | PHP Version 5                                                        |
00004   +----------------------------------------------------------------------+
00005   | Copyright (c) 1997-2012 The PHP Group                                |
00006   +----------------------------------------------------------------------+
00007   | This source file is subject to version 3.01 of the PHP license,      |
00008   | that is bundled with this package in the file LICENSE, and is        |
00009   | available through the world-wide-web at the following url:           |
00010   | http://www.php.net/license/3_01.txt                                  |
00011   | If you did not receive a copy of the PHP license and are unable to   |
00012   | obtain it through the world-wide-web, please send a note to          |
00013   | license@php.net so we can mail you a copy immediately.               |
00014   +----------------------------------------------------------------------+
00015   | Author: Georg Richter <georg@php.net>                                |
00016   +----------------------------------------------------------------------+
00017 
00018   $Id: mysqli_prop.c 321634 2012-01-01 13:15:04Z felipe $
00019 */
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include "config.h"
00023 #endif
00024 
00025 #include <signal.h>
00026 
00027 #include "php.h"
00028 #include "php_ini.h"
00029 #include "ext/standard/info.h"
00030 #include "php_mysqli_structs.h"
00031 #include "mysqli_priv.h"
00032 
00033 #define CHECK_STATUS(value) \
00034        if (!obj->ptr || ((MYSQLI_RESOURCE *)obj->ptr)->status < value ) { \
00035               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Property access is not allowed yet"); \
00036               ZVAL_NULL(*retval); \
00037               return SUCCESS; \
00038        } \
00039 
00040 #define MYSQLI_GET_MYSQL(statusval) \
00041 MYSQL *p; \
00042 MAKE_STD_ZVAL(*retval);\
00043 if (!obj->ptr || !(MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr) { \
00044        php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't fetch %s", obj->zo.ce->name);\
00045        ZVAL_NULL(*retval);\
00046        return SUCCESS; \
00047 } else { \
00048        CHECK_STATUS(statusval);\
00049     p = (MYSQL *)((MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr)->mysql;\
00050 }
00051 
00052 #define MYSQLI_GET_RESULT(statusval) \
00053 MYSQL_RES *p; \
00054 MAKE_STD_ZVAL(*retval);\
00055 if (!obj->ptr) { \
00056        php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't fetch %s", obj->zo.ce->name);\
00057        ZVAL_NULL(*retval);\
00058        return SUCCESS; \
00059 } else { \
00060        CHECK_STATUS(statusval);\
00061        p = (MYSQL_RES *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; \
00062 }
00063 
00064 
00065 #define MYSQLI_GET_STMT(statusval) \
00066 MYSQL_STMT *p; \
00067 MAKE_STD_ZVAL(*retval);\
00068 if (!obj->ptr) { \
00069        php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't fetch %s", obj->zo.ce->name);\
00070        ZVAL_NULL(*retval);\
00071        return SUCCESS; \
00072 } else { \
00073        CHECK_STATUS(statusval);\
00074        p = (MYSQL_STMT *)((MY_STMT *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr)->stmt;\
00075 }
00076 
00077 #define MYSQLI_MAP_PROPERTY_FUNC_LONG( __func, __int_func, __get_type, __ret_type, __ret_type_sprint_mod)\
00078 static int __func(mysqli_object *obj, zval **retval TSRMLS_DC) \
00079 {\
00080        __ret_type l;\
00081        __get_type;\
00082        if (!p) {\
00083               ZVAL_NULL(*retval);\
00084        } else {\
00085               l = (__ret_type)__int_func(p);\
00086               if (l < LONG_MAX) {\
00087                      ZVAL_LONG(*retval, (long) l);\
00088               } else { \
00089                      char *ret; \
00090                      int ret_len = spprintf(&ret, 0, __ret_type_sprint_mod, l); \
00091                      ZVAL_STRINGL(*retval, ret, ret_len, 0); \
00092               } \
00093        }\
00094        return SUCCESS;\
00095 }
00096 
00097 #define MYSQLI_MAP_PROPERTY_FUNC_STRING(__func, __int_func, __get_type)\
00098 static int __func(mysqli_object *obj, zval **retval TSRMLS_DC)\
00099 {\
00100        char *c;\
00101        __get_type;\
00102        if (!p) {\
00103               ZVAL_NULL(*retval);\
00104        } else {\
00105               c = (char *)__int_func(p);\
00106               if (!c) {\
00107                      ZVAL_NULL(*retval);\
00108               } else {\
00109                      ZVAL_STRING(*retval, c, 1);\
00110               }\
00111        }\
00112        return SUCCESS;\
00113 }
00114 
00115 /* {{{ property link_client_version_read */
00116 static int link_client_version_read(mysqli_object *obj, zval **retval TSRMLS_DC)
00117 {
00118        MAKE_STD_ZVAL(*retval);
00119        ZVAL_LONG(*retval, MYSQL_VERSION_ID);
00120        return SUCCESS;
00121 }
00122 /* }}} */
00123 
00124 /* {{{ property link_client_info_read */
00125 static int link_client_info_read(mysqli_object *obj, zval **retval TSRMLS_DC)
00126 {
00127        MAKE_STD_ZVAL(*retval);
00128        CHECK_STATUS(MYSQLI_STATUS_INITIALIZED);
00129        ZVAL_STRING(*retval, MYSQL_SERVER_VERSION, 1);
00130        return SUCCESS;
00131 }
00132 /* }}} */
00133 
00134 /* {{{ property link_connect_errno_read */
00135 static int link_connect_errno_read(mysqli_object *obj, zval **retval TSRMLS_DC)
00136 {
00137        MAKE_STD_ZVAL(*retval);
00138        ZVAL_LONG(*retval, (long)MyG(error_no));
00139        return SUCCESS;
00140 }
00141 /* }}} */
00142 
00143 /* {{{ property link_connect_error_read */
00144 static int link_connect_error_read(mysqli_object *obj, zval **retval TSRMLS_DC)
00145 {
00146        MAKE_STD_ZVAL(*retval);
00147        if (MyG(error_msg)) {
00148               ZVAL_STRING(*retval, MyG(error_msg), 1);
00149        } else {
00150               ZVAL_NULL(*retval);
00151        }
00152        return SUCCESS;
00153 }
00154 /* }}} */
00155 
00156 /* {{{ property link_affected_rows_read */
00157 static int link_affected_rows_read(mysqli_object *obj, zval **retval TSRMLS_DC)
00158 {
00159        MY_MYSQL *mysql;
00160        my_ulonglong rc;
00161 
00162        MAKE_STD_ZVAL(*retval);
00163 
00164        CHECK_STATUS(MYSQLI_STATUS_INITIALIZED);
00165 
00166        mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
00167 
00168        if (!mysql) {
00169               ZVAL_NULL(*retval);
00170        } else {
00171               CHECK_STATUS(MYSQLI_STATUS_VALID);
00172 
00173               rc = mysql_affected_rows(mysql->mysql);
00174 
00175               if (rc == (my_ulonglong) -1) {
00176                      ZVAL_LONG(*retval, -1);
00177                      return SUCCESS;
00178               }
00179 
00180               if (rc < LONG_MAX) {
00181                      ZVAL_LONG(*retval, (long) rc);
00182               } else {
00183                      char *ret;
00184                      int l = spprintf(&ret, 0, MYSQLI_LLU_SPEC, rc);
00185                      ZVAL_STRINGL(*retval, ret, l, 0);
00186               }
00187        }
00188        return SUCCESS;
00189 }
00190 /* }}} */
00191 
00192 /* link properties */
00193 MYSQLI_MAP_PROPERTY_FUNC_LONG(link_errno_read, mysql_errno, MYSQLI_GET_MYSQL(MYSQLI_STATUS_INITIALIZED), ulong, "%lu")
00194 MYSQLI_MAP_PROPERTY_FUNC_STRING(link_error_read, mysql_error, MYSQLI_GET_MYSQL(MYSQLI_STATUS_INITIALIZED))
00195 MYSQLI_MAP_PROPERTY_FUNC_LONG(link_field_count_read, mysql_field_count, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%lu")
00196 MYSQLI_MAP_PROPERTY_FUNC_STRING(link_host_info_read, mysql_get_host_info, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID))
00197 MYSQLI_MAP_PROPERTY_FUNC_STRING(link_info_read, mysql_info, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID))
00198 MYSQLI_MAP_PROPERTY_FUNC_LONG(link_insert_id_read, mysql_insert_id, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), my_ulonglong, MYSQLI_LLU_SPEC)
00199 MYSQLI_MAP_PROPERTY_FUNC_LONG(link_protocol_version_read, mysql_get_proto_info, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%lu")
00200 MYSQLI_MAP_PROPERTY_FUNC_STRING(link_server_info_read, mysql_get_server_info, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID))
00201 MYSQLI_MAP_PROPERTY_FUNC_LONG(link_server_version_read, mysql_get_server_version, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%lu")
00202 MYSQLI_MAP_PROPERTY_FUNC_STRING(link_sqlstate_read, mysql_sqlstate, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID))
00203 MYSQLI_MAP_PROPERTY_FUNC_LONG(link_thread_id_read, mysql_thread_id, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%lu")
00204 MYSQLI_MAP_PROPERTY_FUNC_LONG(link_warning_count_read, mysql_warning_count, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%lu")
00205 
00206 /* {{{ property link_stat_read */
00207 static int link_stat_read(mysqli_object *obj, zval **retval TSRMLS_DC)\
00208 {\
00209 	MY_MYSQL *mysql;
00210 
00211        MAKE_STD_ZVAL(*retval);
00212        ZVAL_NULL(*retval);
00213 
00214        CHECK_STATUS(MYSQLI_STATUS_INITIALIZED);
00215 
00216        mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
00217 
00218        if (mysql) {
00219               char * stat_msg;
00220 #if defined(MYSQLI_USE_MYSQLND)
00221               uint stat_msg_len;
00222               if (mysqlnd_stat(mysql->mysql, &stat_msg, &stat_msg_len) == PASS) {
00223                      ZVAL_STRINGL(*retval, stat_msg, stat_msg_len, 0);
00224               }
00225 #else
00226               if ((stat_msg = (char *) mysql_stat(mysql->mysql))) {
00227                      ZVAL_STRING(*retval, stat_msg, 1);
00228               }
00229 #endif
00230        }
00231        return SUCCESS;
00232 }
00233 /* }}} */
00234 
00235 /* result properties */
00236 
00237 /* {{{ property result_type_read */
00238 static int result_type_read(mysqli_object *obj, zval **retval TSRMLS_DC)
00239 {
00240        MYSQL_RES *p;
00241 
00242        MAKE_STD_ZVAL(*retval);
00243        CHECK_STATUS(MYSQLI_STATUS_VALID);
00244        p = (MYSQL_RES *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
00245 
00246        if (!p) {
00247               ZVAL_NULL(*retval);
00248        } else {
00249               ZVAL_LONG(*retval, mysqli_result_is_unbuffered(p) ? MYSQLI_USE_RESULT:MYSQLI_STORE_RESULT);
00250        }
00251        return SUCCESS;
00252 }
00253 /* }}} */
00254 
00255 /* {{{ property result_lengths_read */
00256 static int result_lengths_read(mysqli_object *obj, zval **retval TSRMLS_DC)
00257 {
00258        MYSQL_RES *p;
00259        ulong *ret;
00260 
00261        MAKE_STD_ZVAL(*retval);
00262 
00263        CHECK_STATUS(MYSQLI_STATUS_VALID);
00264        p = (MYSQL_RES *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
00265        if (!p || !p->field_count || !(ret = mysql_fetch_lengths(p))) {
00266               ZVAL_NULL(*retval);
00267        } else {
00268               ulong i;
00269 
00270               array_init(*retval);
00271 
00272               for (i = 0; i < p->field_count; i++) {
00273                      add_index_long(*retval, i, ret[i]);
00274               }
00275        }
00276        return SUCCESS;
00277 }
00278 /* }}} */
00279 
00280 
00281 MYSQLI_MAP_PROPERTY_FUNC_LONG(result_current_field_read, mysql_field_tell, MYSQLI_GET_RESULT(MYSQLI_STATUS_VALID), ulong, "%lu")
00282 MYSQLI_MAP_PROPERTY_FUNC_LONG(result_field_count_read, mysql_num_fields, MYSQLI_GET_RESULT(MYSQLI_STATUS_VALID), ulong, "%lu")
00283 MYSQLI_MAP_PROPERTY_FUNC_LONG(result_num_rows_read, mysql_num_rows, MYSQLI_GET_RESULT(MYSQLI_STATUS_VALID), my_ulonglong, MYSQLI_LLU_SPEC)
00284 
00285 /* statement properties */
00286 
00287 /* {{{ property stmt_id_read */
00288 static int stmt_id_read(mysqli_object *obj, zval **retval TSRMLS_DC)
00289 {
00290        MY_STMT *p;
00291 
00292        MAKE_STD_ZVAL(*retval);
00293        CHECK_STATUS(MYSQLI_STATUS_VALID);
00294 
00295        p = (MY_STMT*)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
00296 
00297        if (!p) {
00298               ZVAL_NULL(*retval);
00299        } else {
00300               ZVAL_LONG(*retval, mysqli_stmt_get_id(p->stmt));
00301        }
00302        return SUCCESS;
00303 }
00304 /* }}} */
00305 
00306 /* {{{ property stmt_affected_rows_read */
00307 static int stmt_affected_rows_read(mysqli_object *obj, zval **retval TSRMLS_DC)
00308 {
00309        MY_STMT *p;
00310        my_ulonglong rc;
00311 
00312        MAKE_STD_ZVAL(*retval);
00313        CHECK_STATUS(MYSQLI_STATUS_VALID);
00314 
00315        p = (MY_STMT *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
00316 
00317        if (!p) {
00318               ZVAL_NULL(*retval);
00319        } else {
00320               rc = mysql_stmt_affected_rows(p->stmt);
00321 
00322               if (rc == (my_ulonglong) -1) {
00323                      ZVAL_LONG(*retval, -1);
00324                      return SUCCESS;
00325               }
00326 
00327               if (rc < LONG_MAX) {
00328                      ZVAL_LONG(*retval, (long) rc);
00329               } else {
00330                      char *ret;
00331                      int l = spprintf(&ret, 0, MYSQLI_LLU_SPEC, rc);
00332                      ZVAL_STRINGL(*retval, ret, l, 0);
00333               }
00334        }
00335        return SUCCESS;
00336 }
00337 /* }}} */
00338 
00339 MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_insert_id_read, mysql_stmt_insert_id, MYSQLI_GET_STMT(MYSQLI_STATUS_VALID), my_ulonglong, MYSQLI_LLU_SPEC)
00340 MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_num_rows_read, mysql_stmt_num_rows, MYSQLI_GET_STMT(MYSQLI_STATUS_VALID), my_ulonglong, MYSQLI_LLU_SPEC)
00341 MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_param_count_read, mysql_stmt_param_count, MYSQLI_GET_STMT(MYSQLI_STATUS_VALID), ulong, "%lu")
00342 MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_field_count_read, mysql_stmt_field_count, MYSQLI_GET_STMT(MYSQLI_STATUS_VALID), ulong, "%lu")
00343 MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_errno_read, mysql_stmt_errno, MYSQLI_GET_STMT(MYSQLI_STATUS_INITIALIZED), ulong, "%lu")
00344 MYSQLI_MAP_PROPERTY_FUNC_STRING(stmt_error_read, mysql_stmt_error, MYSQLI_GET_STMT(MYSQLI_STATUS_INITIALIZED))
00345 MYSQLI_MAP_PROPERTY_FUNC_STRING(stmt_sqlstate_read, mysql_stmt_sqlstate, MYSQLI_GET_STMT(MYSQLI_STATUS_INITIALIZED))
00346 
00347 /* }}} */
00348 const mysqli_property_entry mysqli_link_property_entries[] = {
00349        {"affected_rows",    sizeof("affected_rows") - 1,       link_affected_rows_read, NULL},
00350        {"client_info",      sizeof("client_info") - 1,         link_client_info_read, NULL},
00351        {"client_version",   sizeof("client_version") - 1,      link_client_version_read, NULL},
00352        {"connect_errno",    sizeof("connect_errno") - 1,       link_connect_errno_read, NULL},
00353        {"connect_error",    sizeof("connect_error") - 1,       link_connect_error_read, NULL},
00354        {"errno",                   sizeof("errno") - 1,               link_errno_read, NULL},
00355        {"error",                   sizeof("error") - 1,               link_error_read, NULL},
00356        {"field_count",             sizeof("field_count") - 1,         link_field_count_read, NULL},
00357        {"host_info",        sizeof("host_info") - 1,           link_host_info_read, NULL},
00358        {"info",                    sizeof("info") - 1,                       link_info_read, NULL},
00359        {"insert_id",        sizeof("insert_id") - 1,           link_insert_id_read, NULL},
00360        {"server_info",             sizeof("server_info") - 1,         link_server_info_read, NULL},
00361        {"server_version",   sizeof("server_version") - 1,      link_server_version_read, NULL},
00362        {"stat",                    sizeof("stat") - 1,                       link_stat_read, NULL},
00363        {"sqlstate",         sizeof("sqlstate") - 1,                   link_sqlstate_read, NULL},
00364        {"protocol_version",sizeof("protocol_version") - 1,     link_protocol_version_read, NULL},
00365        {"thread_id",        sizeof("thread_id") - 1,           link_thread_id_read, NULL},
00366        {"warning_count",    sizeof("warning_count") - 1,       link_warning_count_read, NULL},
00367        {NULL, 0, NULL, NULL}
00368 };
00369 
00370 /* should not be const, as it is patched during runtime */
00371 zend_property_info mysqli_link_property_info_entries[] = {
00372        {ZEND_ACC_PUBLIC, "affected_rows", sizeof("affected_rows") - 1,       0, NULL, 0, NULL},
00373        {ZEND_ACC_PUBLIC, "client_info",   sizeof("client_info") - 1,         0, NULL, 0, NULL},
00374        {ZEND_ACC_PUBLIC, "client_version",       sizeof("client_version") - 1,      0, NULL, 0, NULL},
00375        {ZEND_ACC_PUBLIC, "connect_errno", sizeof("connect_errno") - 1,       0, NULL, 0, NULL},
00376        {ZEND_ACC_PUBLIC, "connect_error", sizeof("connect_error") - 1,       0, NULL, 0, NULL},
00377        {ZEND_ACC_PUBLIC, "errno",                sizeof("errno") - 1,               0, NULL, 0, NULL},
00378        {ZEND_ACC_PUBLIC, "error",                sizeof("error") - 1,               0, NULL, 0, NULL},
00379        {ZEND_ACC_PUBLIC, "field_count",   sizeof("field_count") - 1,         0, NULL, 0, NULL},
00380        {ZEND_ACC_PUBLIC, "host_info",            sizeof("host_info") - 1,           0, NULL, 0, NULL},
00381        {ZEND_ACC_PUBLIC, "info",                 sizeof("info") - 1,                       0, NULL, 0, NULL},
00382        {ZEND_ACC_PUBLIC, "insert_id",            sizeof("insert_id") - 1,           0, NULL, 0, NULL},
00383        {ZEND_ACC_PUBLIC, "server_info",   sizeof("server_info") - 1,         0, NULL, 0, NULL},
00384        {ZEND_ACC_PUBLIC, "server_version",       sizeof("server_version") - 1,      0, NULL, 0, NULL},
00385        {ZEND_ACC_PUBLIC, "stat",                 sizeof("stat") - 1,                       0, NULL, 0, NULL},
00386        {ZEND_ACC_PUBLIC, "sqlstate",             sizeof("sqlstate") - 1,                   0, NULL, 0, NULL},
00387        {ZEND_ACC_PUBLIC, "protocol_version", sizeof("protocol_version")-1, 0, NULL, 0, NULL},
00388        {ZEND_ACC_PUBLIC, "thread_id",            sizeof("thread_id") - 1,           0, NULL, 0, NULL},
00389        {ZEND_ACC_PUBLIC, "warning_count", sizeof("warning_count") - 1,       0, NULL, 0, NULL},
00390        {0,                                NULL,                0,                                                      0, NULL, 0, NULL}
00391 };
00392 
00393 
00394 const mysqli_property_entry mysqli_result_property_entries[] = {
00395        {"current_field",sizeof("current_field")-1,      result_current_field_read, NULL},
00396        {"field_count", sizeof("field_count") - 1,       result_field_count_read, NULL},
00397        {"lengths",   sizeof("lengths") - 1,             result_lengths_read, NULL},
00398        {"num_rows",  sizeof("num_rows") - 1,            result_num_rows_read, NULL},
00399        {"type",             sizeof("type") - 1,                result_type_read, NULL},
00400        {NULL, 0, NULL, NULL}
00401 };
00402 
00403 zend_property_info mysqli_result_property_info_entries[] = {
00404        {ZEND_ACC_PUBLIC, "current_field", sizeof("current_field")-1,  0, NULL, 0, NULL},
00405        {ZEND_ACC_PUBLIC, "field_count",   sizeof("field_count") - 1,  0, NULL, 0, NULL},
00406        {ZEND_ACC_PUBLIC, "lengths",              sizeof("lengths") - 1,             0, NULL, 0, NULL},
00407        {ZEND_ACC_PUBLIC, "num_rows",             sizeof("num_rows") - 1,     0, NULL, 0, NULL},
00408        {ZEND_ACC_PUBLIC, "type",                 sizeof("type") - 1,         0, NULL, 0, NULL},
00409        {0,                                NULL,                0,                                               0, NULL, 0, NULL}
00410 };
00411 
00412 const mysqli_property_entry mysqli_stmt_property_entries[] = {
00413        {"affected_rows", sizeof("affected_rows")-1,stmt_affected_rows_read, NULL},
00414        {"insert_id", sizeof("insert_id") - 1,    stmt_insert_id_read, NULL},
00415        {"num_rows",  sizeof("num_rows") - 1,     stmt_num_rows_read, NULL},
00416        {"param_count", sizeof("param_count") - 1,       stmt_param_count_read, NULL},
00417        {"field_count", sizeof("field_count") - 1,       stmt_field_count_read, NULL},
00418        {"errno",            sizeof("errno") - 1,        stmt_errno_read, NULL},
00419        {"error",            sizeof("error") - 1,               stmt_error_read, NULL},
00420        {"sqlstate",  sizeof("sqlstate") - 1,            stmt_sqlstate_read, NULL},
00421        {"id",               sizeof("id") - 1,                  stmt_id_read, NULL},
00422        {NULL, 0, NULL, NULL}
00423 };
00424 
00425 
00426 zend_property_info mysqli_stmt_property_info_entries[] = {
00427        {ZEND_ACC_PUBLIC, "affected_rows", sizeof("affected_rows") - 1,       0, NULL, 0, NULL},
00428        {ZEND_ACC_PUBLIC, "insert_id",     sizeof("insert_id") - 1,           0, NULL, 0, NULL},
00429        {ZEND_ACC_PUBLIC, "num_rows",      sizeof("num_rows") - 1,                   0, NULL, 0, NULL},
00430        {ZEND_ACC_PUBLIC, "param_count",sizeof("param_count") - 1,            0, NULL, 0, NULL},
00431        {ZEND_ACC_PUBLIC, "field_count",sizeof("field_count") - 1,            0, NULL, 0, NULL},
00432        {ZEND_ACC_PUBLIC, "errno",         sizeof("errno") - 1,               0, NULL, 0, NULL},
00433        {ZEND_ACC_PUBLIC, "error",         sizeof("error") - 1,               0, NULL, 0, NULL},
00434        {ZEND_ACC_PUBLIC, "sqlstate",      sizeof("sqlstate") - 1,                   0, NULL, 0, NULL},
00435        {ZEND_ACC_PUBLIC, "id",                   sizeof("id") - 1,                         0, NULL, 0, NULL},
00436        {0,                                NULL,                0,                                               0, NULL, 0, NULL}
00437 };
00438 
00439 /*
00440  * Local variables:
00441  * tab-width: 4
00442  * c-basic-offset: 4
00443  * End:
00444  * vim600: noet sw=4 ts=4 fdm=marker
00445  * vim<600: noet sw=4 ts=4
00446  */