Back to index

php5  5.3.10
Classes | Defines | Typedefs | Enumerations | Variables
php_mysqli_structs.h File Reference
#include <my_global.h>
#include <my_sys.h>
#include <mysql.h>
#include <errmsg.h>
#include <my_list.h>
#include <m_string.h>
#include <mysqld_error.h>
#include <m_ctype.h>
#include "mysqli_libmysql.h"
#include <inttypes.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  VAR_BUFFER
struct  BIND_BUFFER
struct  MY_STMT
struct  MY_MYSQL
struct  PROFILER
struct  MYSQLI_RESOURCE
struct  _mysqli_object
struct  st_mysqli_warning
struct  _mysqli_property_entry
struct  mysqli_local_infile
struct  mysqli_plist_entry

Defines

#define TRUE   1
#define FALSE   0
#define MYSQLI_VERSION_ID   101009
#define PHP_MYSQLI_API
#define MYSQLI_LLU_SPEC   "%" PRIu64
#define MYSQLI_LL_SPEC   "%" PRId64
#define L64(x)   x##LL
#define MYSQLI_REGISTER_RESOURCE_EX(__ptr, __zval)   ((mysqli_object *) zend_object_store_get_object(__zval TSRMLS_CC))->ptr = __ptr;
#define MYSQLI_RETURN_RESOURCE(__ptr, __ce)
#define MYSQLI_REGISTER_RESOURCE(__ptr, __ce)
#define MYSQLI_FETCH_RESOURCE(__ptr, __type, __id, __name, __check)
#define MYSQLI_FETCH_RESOURCE_CONN(__ptr, __id, __check)
#define MYSQLI_FETCH_RESOURCE_STMT(__ptr, __id, __check)
#define MYSQLI_SET_STATUS(__id, __value)
#define MYSQLI_CLEAR_RESOURCE(__id)
#define MyG(v)   (mysqli_globals.v)
#define my_estrdup(x)   (x) ? estrdup(x) : NULL
#define my_efree(x)   if (x) efree(x)

Typedefs

typedef struct _mysqli_object mysqli_object
typedef struct st_mysqli_warning
typedef struct
_mysqli_property_entry 
mysqli_property_entry
typedef int64_t my_longlong

Enumerations

enum  mysqli_status { MYSQLI_STATUS_UNKNOWN = 0, MYSQLI_STATUS_CLEARED, MYSQLI_STATUS_INITIALIZED, MYSQLI_STATUS_VALID }

Variables

zend_class_entry * mysqli_link_class_entry
zend_class_entry * mysqli_stmt_class_entry
zend_class_entry * mysqli_result_class_entry
zend_class_entry * mysqli_driver_class_entry
zend_class_entry * mysqli_warning_class_entry
zend_class_entry * mysqli_exception_class_entry
long default_link
long num_links
long max_links
long num_active_persistent
long num_inactive_persistent
long max_persistent
long allow_persistent
long cache_size
unsigned long default_port
char * default_host
char * default_user
char * default_socket
char * default_pw
long reconnect
long allow_local_infile
long strict
long error_no
char * error_msg
long report_mode
HashTablereport_ht
unsigned long multi_query
unsigned long embedded

Class Documentation

struct VAR_BUFFER

Definition at line 98 of file php_mysqli_structs.h.

Class Members
ulong buflen
ulong output_len
ulong type
char * val
struct BIND_BUFFER

Definition at line 105 of file php_mysqli_structs.h.

Collaboration diagram for BIND_BUFFER:
Class Members
VAR_BUFFER * buf
char * is_null
unsigned int var_cnt
zval ** vars
struct MY_STMT

Definition at line 112 of file php_mysqli_structs.h.

Collaboration diagram for MY_STMT:
Class Members
BIND_BUFFER param
char * query
BIND_BUFFER result
MYSQL_STMT * stmt
struct MY_MYSQL

Definition at line 119 of file php_mysqli_structs.h.

Class Members
char * hash_key
zval * li_read
php_stream * li_stream
unsigned int multi_query
MYSQL * mysql
zend_bool persistent
struct PROFILER

Definition at line 131 of file php_mysqli_structs.h.

Class Members
FILE * fp
int mode
int socket
struct MYSQLI_RESOURCE

Definition at line 137 of file php_mysqli_structs.h.

Class Members
void * info
void * ptr
struct _mysqli_object

Definition at line 143 of file php_mysqli_structs.h.

Collaboration diagram for _mysqli_object:
Class Members
HashTable * prop_handler
void * ptr
zend_object zo
struct st_mysqli_warning

Definition at line 151 of file php_mysqli_structs.h.

Class Members
int errorno
MYSQLI_WARNING * next
zval reason
zval sqlstate
struct mysqli_local_infile

Definition at line 166 of file php_mysqli_structs.h.

Class Members
char error_msg
void * userdata
struct mysqli_plist_entry

Definition at line 172 of file php_mysqli_structs.h.

Collaboration diagram for mysqli_plist_entry:
Class Members
zend_ptr_stack free_links

Define Documentation

#define FALSE   0

Definition at line 36 of file php_mysqli_structs.h.

#define L64 (   x)    x##LL

Definition at line 195 of file php_mysqli_structs.h.

#define my_efree (   x)    if (x) efree(x)

Definition at line 313 of file php_mysqli_structs.h.

#define my_estrdup (   x)    (x) ? estrdup(x) : NULL

Definition at line 312 of file php_mysqli_structs.h.

#define MyG (   v)    (mysqli_globals.v)

Definition at line 309 of file php_mysqli_structs.h.

#define MYSQLI_CLEAR_RESOURCE (   __id)
Value:
{ \
	mysqli_object *intern = (mysqli_object *)zend_object_store_get_object(*(__id) TSRMLS_CC);\
       efree(intern->ptr); \
       intern->ptr = NULL; \
}

Definition at line 272 of file php_mysqli_structs.h.

#define MYSQLI_FETCH_RESOURCE (   __ptr,
  __type,
  __id,
  __name,
  __check 
)
Value:
{ \
	MYSQLI_RESOURCE *my_res; \
	mysqli_object *intern = (mysqli_object *)zend_object_store_get_object(*(__id) TSRMLS_CC);\
       if (!(my_res = (MYSQLI_RESOURCE *)intern->ptr)) {\
              php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't fetch %s", intern->zo.ce->name);\
              RETURN_NULL();\
       }\
       __ptr = (__type)my_res->ptr; \
       if (__check && my_res->status < __check) { \
              php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid object or resource %s\n", intern->zo.ce->name); \
              RETURN_NULL();\
       }\
}

Definition at line 230 of file php_mysqli_structs.h.

#define MYSQLI_FETCH_RESOURCE_CONN (   __ptr,
  __id,
  __check 
)
Value:
{ \
       MYSQLI_FETCH_RESOURCE((__ptr), MY_MYSQL *, (__id), "mysqli_link", (__check)); \
       if (!(__ptr)->mysql) { \
		mysqli_object *intern = (mysqli_object *)zend_object_store_get_object(*(__id) TSRMLS_CC);\
              php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid object or resource %s\n", intern->zo.ce->name); \
              RETURN_NULL();\
       } \
}

Definition at line 245 of file php_mysqli_structs.h.

#define MYSQLI_FETCH_RESOURCE_STMT (   __ptr,
  __id,
  __check 
)
Value:
{ \
       MYSQLI_FETCH_RESOURCE((__ptr), MY_STMT *, (__id), "mysqli_stmt", (__check)); \
       if (!(__ptr)->stmt) { \
		mysqli_object *intern = (mysqli_object *)zend_object_store_get_object(*(__id) TSRMLS_CC);\
              php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid object or resource %s\n", intern->zo.ce->name); \
              RETURN_NULL();\
       } \
}

Definition at line 255 of file php_mysqli_structs.h.

#define MYSQLI_LL_SPEC   "%" PRId64

Definition at line 193 of file php_mysqli_structs.h.

#define MYSQLI_LLU_SPEC   "%" PRIu64

Definition at line 192 of file php_mysqli_structs.h.

#define MYSQLI_REGISTER_RESOURCE (   __ptr,
  __ce 
)
Value:
{\
       zval *object = getThis();\
       if (!object || !instanceof_function(Z_OBJCE_P(object), mysqli_link_class_entry TSRMLS_CC)) {\
              object = return_value;\
              Z_TYPE_P(object) = IS_OBJECT;\
              (object)->value.obj = mysqli_objects_new(__ce TSRMLS_CC);\
       }\
       MYSQLI_REGISTER_RESOURCE_EX(__ptr, object)\
}

Definition at line 219 of file php_mysqli_structs.h.

#define MYSQLI_REGISTER_RESOURCE_EX (   __ptr,
  __zval 
)    ((mysqli_object *) zend_object_store_get_object(__zval TSRMLS_CC))->ptr = __ptr;

Definition at line 211 of file php_mysqli_structs.h.

#define MYSQLI_RETURN_RESOURCE (   __ptr,
  __ce 
)
Value:
Z_TYPE_P(return_value) = IS_OBJECT; \
       (return_value)->value.obj = mysqli_objects_new(__ce TSRMLS_CC); \
       MYSQLI_REGISTER_RESOURCE_EX(__ptr, return_value)

Definition at line 214 of file php_mysqli_structs.h.

#define MYSQLI_SET_STATUS (   __id,
  __value 
)
Value:
{ \
	mysqli_object *intern = (mysqli_object *)zend_object_store_get_object(*(__id) TSRMLS_CC);\
       ((MYSQLI_RESOURCE *)intern->ptr)->status = __value; \
} \

Definition at line 266 of file php_mysqli_structs.h.

#define MYSQLI_VERSION_ID   101009

Definition at line 89 of file php_mysqli_structs.h.

#define PHP_MYSQLI_API

Definition at line 188 of file php_mysqli_structs.h.

#define TRUE   1

Definition at line 32 of file php_mysqli_structs.h.


Typedef Documentation

Definition at line 197 of file php_mysqli_structs.h.

typedef struct _mysqli_object mysqli_object
typedef struct st_mysqli_warning

Definition at line 149 of file php_mysqli_structs.h.


Enumeration Type Documentation

Enumerator:
MYSQLI_STATUS_UNKNOWN 
MYSQLI_STATUS_CLEARED 
MYSQLI_STATUS_INITIALIZED 
MYSQLI_STATUS_VALID 

Definition at line 91 of file php_mysqli_structs.h.


Variable Documentation

Definition at line 295 of file php_mysqli_structs.h.

Definition at line 287 of file php_mysqli_structs.h.

long cache_size

Definition at line 288 of file php_mysqli_structs.h.

char* default_host

Definition at line 290 of file php_mysqli_structs.h.

Definition at line 281 of file php_mysqli_structs.h.

unsigned long default_port

Definition at line 289 of file php_mysqli_structs.h.

char* default_pw

Definition at line 293 of file php_mysqli_structs.h.

Definition at line 292 of file php_mysqli_structs.h.

char* default_user

Definition at line 291 of file php_mysqli_structs.h.

unsigned long embedded

Definition at line 302 of file php_mysqli_structs.h.

char* error_msg

Definition at line 298 of file php_mysqli_structs.h.

long error_no

Definition at line 297 of file php_mysqli_structs.h.

long max_links

Definition at line 283 of file php_mysqli_structs.h.

Definition at line 286 of file php_mysqli_structs.h.

unsigned long multi_query

Definition at line 301 of file php_mysqli_structs.h.

zend_class_entry* mysqli_driver_class_entry

Definition at line 72 of file mysqli.c.

zend_class_entry* mysqli_exception_class_entry

Definition at line 74 of file mysqli.c.

zend_class_entry* mysqli_link_class_entry

Definition at line 69 of file mysqli.c.

zend_class_entry* mysqli_result_class_entry

Definition at line 71 of file mysqli.c.

zend_class_entry* mysqli_stmt_class_entry

Definition at line 70 of file mysqli.c.

zend_class_entry* mysqli_warning_class_entry

Definition at line 73 of file mysqli.c.

Definition at line 284 of file php_mysqli_structs.h.

Definition at line 285 of file php_mysqli_structs.h.

long num_links

Definition at line 282 of file php_mysqli_structs.h.

long reconnect

Definition at line 294 of file php_mysqli_structs.h.

Definition at line 300 of file php_mysqli_structs.h.

Definition at line 299 of file php_mysqli_structs.h.

long strict

Definition at line 296 of file php_mysqli_structs.h.