1999-09-03 19:54:12 +00:00
|
|
|
/*
|
1999-04-21 21:26:10 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2004-01-08 17:33:29 +00:00
|
|
|
| PHP Version 5 |
|
1999-04-21 21:26:10 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2005-08-03 14:08:58 +00:00
|
|
|
| Copyright (c) 1997-2005 The PHP Group |
|
1999-04-21 21:26:10 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2003-06-10 20:04:29 +00:00
|
|
|
| This source file is subject to version 3.0 of the PHP license, |
|
1999-09-03 19:54:12 +00:00
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
2003-06-10 20:04:29 +00:00
|
|
|
| available through the world-wide-web at the following url: |
|
|
|
|
| http://www.php.net/license/3_0.txt. |
|
1999-09-03 19:54:12 +00:00
|
|
|
| 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. |
|
1999-04-21 21:26:10 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2002-02-28 08:29:35 +00:00
|
|
|
| Author: Zeev Suraski <zeev@zend.com> |
|
1999-04-21 21:26:10 +00:00
|
|
|
+----------------------------------------------------------------------+
|
1999-09-03 19:54:12 +00:00
|
|
|
*/
|
1999-04-21 21:26:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
2000-07-02 23:46:51 +00:00
|
|
|
#ifndef PHP_MYSQL_H
|
|
|
|
#define PHP_MYSQL_H
|
1999-04-21 21:26:10 +00:00
|
|
|
|
2000-02-12 14:38:31 +00:00
|
|
|
#ifdef PHP_WIN32
|
1999-06-04 12:51:41 +00:00
|
|
|
#define PHP_MYSQL_API __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
#define PHP_MYSQL_API
|
1999-04-21 21:26:10 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HAVE_MYSQL
|
|
|
|
|
2000-06-10 08:48:01 +00:00
|
|
|
#ifdef ZTS
|
1999-06-04 10:45:54 +00:00
|
|
|
#include "TSRM.h"
|
|
|
|
#endif
|
|
|
|
|
1999-09-03 19:54:12 +00:00
|
|
|
extern zend_module_entry mysql_module_entry;
|
|
|
|
|
1999-04-21 21:26:10 +00:00
|
|
|
#define mysql_module_ptr &mysql_module_entry
|
|
|
|
|
2001-07-30 01:56:43 +00:00
|
|
|
PHP_MINIT_FUNCTION(mysql);
|
|
|
|
PHP_RINIT_FUNCTION(mysql);
|
|
|
|
PHP_MSHUTDOWN_FUNCTION(mysql);
|
|
|
|
PHP_RSHUTDOWN_FUNCTION(mysql);
|
1999-08-02 16:06:13 +00:00
|
|
|
PHP_MINFO_FUNCTION(mysql);
|
|
|
|
|
1999-05-21 10:06:25 +00:00
|
|
|
PHP_FUNCTION(mysql_connect);
|
|
|
|
PHP_FUNCTION(mysql_pconnect);
|
|
|
|
PHP_FUNCTION(mysql_close);
|
|
|
|
PHP_FUNCTION(mysql_select_db);
|
2001-11-02 06:42:12 +00:00
|
|
|
#if MYSQL_VERSION_ID < 40000
|
1999-05-21 10:06:25 +00:00
|
|
|
PHP_FUNCTION(mysql_create_db);
|
|
|
|
PHP_FUNCTION(mysql_drop_db);
|
2001-11-02 06:42:12 +00:00
|
|
|
#endif
|
1999-05-21 10:06:25 +00:00
|
|
|
PHP_FUNCTION(mysql_query);
|
2001-03-13 22:52:53 +00:00
|
|
|
PHP_FUNCTION(mysql_unbuffered_query);
|
1999-05-21 10:06:25 +00:00
|
|
|
PHP_FUNCTION(mysql_db_query);
|
|
|
|
PHP_FUNCTION(mysql_list_dbs);
|
|
|
|
PHP_FUNCTION(mysql_list_tables);
|
|
|
|
PHP_FUNCTION(mysql_list_fields);
|
2002-03-24 10:57:40 +00:00
|
|
|
PHP_FUNCTION(mysql_list_processes);
|
1999-05-21 10:06:25 +00:00
|
|
|
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);
|
2000-09-20 21:43:57 +00:00
|
|
|
PHP_FUNCTION(mysql_fetch_assoc);
|
1999-05-21 10:06:25 +00:00
|
|
|
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);
|
2000-10-11 18:27:21 +00:00
|
|
|
PHP_FUNCTION(mysql_escape_string);
|
2002-03-24 17:19:19 +00:00
|
|
|
PHP_FUNCTION(mysql_real_escape_string);
|
2001-01-31 22:04:30 +00:00
|
|
|
PHP_FUNCTION(mysql_get_client_info);
|
|
|
|
PHP_FUNCTION(mysql_get_host_info);
|
|
|
|
PHP_FUNCTION(mysql_get_proto_info);
|
|
|
|
PHP_FUNCTION(mysql_get_server_info);
|
2002-03-29 12:47:02 +00:00
|
|
|
PHP_FUNCTION(mysql_info);
|
2002-03-24 10:57:40 +00:00
|
|
|
PHP_FUNCTION(mysql_stat);
|
2002-03-24 17:19:19 +00:00
|
|
|
PHP_FUNCTION(mysql_thread_id);
|
2002-08-24 21:41:25 +00:00
|
|
|
PHP_FUNCTION(mysql_client_encoding);
|
2002-03-24 17:34:20 +00:00
|
|
|
PHP_FUNCTION(mysql_ping);
|
1999-04-21 21:26:10 +00:00
|
|
|
|
2000-04-01 16:23:39 +00:00
|
|
|
ZEND_BEGIN_MODULE_GLOBALS(mysql)
|
1999-04-21 21:26:10 +00:00
|
|
|
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;
|
2000-06-16 01:53:35 +00:00
|
|
|
char *default_socket;
|
2001-05-04 01:14:26 +00:00
|
|
|
char *connect_error;
|
|
|
|
long connect_errno;
|
2002-07-16 13:53:54 +00:00
|
|
|
long connect_timeout;
|
2002-11-11 12:54:06 +00:00
|
|
|
long result_allocated;
|
|
|
|
long trace_mode;
|
2000-06-19 12:56:30 +00:00
|
|
|
ZEND_END_MODULE_GLOBALS(mysql)
|
1999-04-21 21:26:10 +00:00
|
|
|
|
|
|
|
#ifdef ZTS
|
2001-07-28 11:36:37 +00:00
|
|
|
# define MySG(v) TSRMG(mysql_globals_id, zend_mysql_globals *, v)
|
1999-04-21 21:26:10 +00:00
|
|
|
#else
|
|
|
|
# define MySG(v) (mysql_globals.v)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define mysql_module_ptr NULL
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
1999-05-08 18:16:30 +00:00
|
|
|
#define phpext_mysql_ptr mysql_module_ptr
|
|
|
|
|
2000-07-02 23:46:51 +00:00
|
|
|
#endif /* PHP_MYSQL_H */
|