1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
/*
+----------------------------------------------------------------------+
| PHP version 4.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_0.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef _PHP_MYSQL_H
#define _PHP_MYSQL_H
#ifdef COMPILE_DL
# undef HAVE_MYSQL
# define HAVE_MYSQL 1
#endif
#ifdef PHP_WIN32
#define PHP_MYSQL_API __declspec(dllexport)
#else
#define PHP_MYSQL_API
#endif
#if HAVE_MYSQL
#ifdef __ZTS
#include "TSRM.h"
#endif
extern zend_module_entry mysql_module_entry;
#define mysql_module_ptr &mysql_module_entry
extern PHP_MINIT_FUNCTION(mysql);
extern PHP_RINIT_FUNCTION(mysql);
extern PHP_MSHUTDOWN_FUNCTION(mysql);
PHP_MINFO_FUNCTION(mysql);
PHP_FUNCTION(mysql_connect);
PHP_FUNCTION(mysql_pconnect);
PHP_FUNCTION(mysql_close);
PHP_FUNCTION(mysql_select_db);
PHP_FUNCTION(mysql_create_db);
PHP_FUNCTION(mysql_drop_db);
PHP_FUNCTION(mysql_query);
PHP_FUNCTION(mysql_db_query);
PHP_FUNCTION(mysql_list_dbs);
PHP_FUNCTION(mysql_list_tables);
PHP_FUNCTION(mysql_list_fields);
PHP_FUNCTION(mysql_error);
PHP_FUNCTION(mysql_errno);
PHP_FUNCTION(mysql_affected_rows);
PHP_FUNCTION(mysql_insert_id);
PHP_FUNCTION(mysql_result);
PHP_FUNCTION(mysql_num_rows);
PHP_FUNCTION(mysql_num_fields);
PHP_FUNCTION(mysql_fetch_row);
PHP_FUNCTION(mysql_fetch_array);
PHP_FUNCTION(mysql_fetch_object);
PHP_FUNCTION(mysql_data_seek);
PHP_FUNCTION(mysql_fetch_lengths);
PHP_FUNCTION(mysql_fetch_field);
PHP_FUNCTION(mysql_field_seek);
PHP_FUNCTION(mysql_free_result);
PHP_FUNCTION(mysql_field_name);
PHP_FUNCTION(mysql_field_table);
PHP_FUNCTION(mysql_field_len);
PHP_FUNCTION(mysql_field_type);
PHP_FUNCTION(mysql_field_flags);
typedef struct {
long default_link;
long num_links,num_persistent;
long max_links,max_persistent;
long allow_persistent;
long default_port;
char *default_host, *default_user, *default_password;
} php_mysql_globals;
#ifdef ZTS
# define MySLS_D php_mysql_globals *mysql_globals
# define MySLS_DC , MySLS_D
# define MySLS_C mysql_globals
# define MySLS_CC , MySLS_C
# define MySG(v) (mysql_globals->v)
# define MySLS_FETCH() php_mysql_globals *mysql_globals = ts_resource(mysql_globals_id)
#else
# define MySLS_D
# define MySLS_DC
# define MySLS_C
# define MySLS_CC
# define MySG(v) (mysql_globals.v)
# define MySLS_FETCH()
extern PHP_MYSQL_API php_mysql_globals mysql_globals;
#endif
#else
#define mysql_module_ptr NULL
#endif
#define phpext_mysql_ptr mysql_module_ptr
#endif /* _PHP_MYSQL_H */
|