cvs: php4 /ext/mysql php_mysql.c

From: Date: Fri, 12 Jul 2002 22:59:35 +0000
Subject: cvs: php4 /ext/mysql php_mysql.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12803@lists.php.net to get a copy of this message
sniper Fri Jul 12 18:59:35 2002 EDT Modified files: /php4/ext/mysql php_mysql.c Log: Beauify a bit.. Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.140 php4/ext/mysql/php_mysql.c:1.141 --- php4/ext/mysql/php_mysql.c:1.140 Fri Jul 12 18:57:19 2002 +++ php4/ext/mysql/php_mysql.c Fri Jul 12 18:59:35 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysql.c,v 1.140 2002/07/12 22:57:19 sniper Exp $ */ +/* $Id: php_mysql.c,v 1.141 2002/07/12 22:59:35 sniper Exp $ */ /* TODO: * @@ -109,24 +109,6 @@ int active_result_id; } php_mysql_conn; -static int _rollback_mysql_transactions(zend_rsrc_list_entry *rsrc TSRMLS_DC) -{ - php_mysql_conn *link; - char query[128]; - - /* check if its a persistent link */ - if (Z_TYPE_P(rsrc) != le_plink) - return 0; - - link = (php_mysql_conn *) rsrc->ptr; - - /* rollback possible transactions */ - strcpy (query, "ROLLBACK"); - mysql_real_query(&link->conn, query, strlen(query)); - - return 0; -} - /* {{{ mysql_functions[] */ function_entry mysql_functions[] = { @@ -235,6 +217,27 @@ #define CHECK_LINK(link) { if (link==-1) { php_error(E_WARNING, "%s(): A link to the server could not be established", get_active_function_name(TSRMLS_C)); RETURN_FALSE; } } +/* {{{ _rollback_mysql_transactions + */ +static int _rollback_mysql_transactions(zend_rsrc_list_entry *rsrc TSRMLS_DC) +{ + php_mysql_conn *link; + char query[128]; + + /* check if its a persistent link */ + if (Z_TYPE_P(rsrc) != le_plink) + return 0; + + link = (php_mysql_conn *) rsrc->ptr; + + /* rollback possible transactions */ + strcpy (query, "ROLLBACK"); + mysql_real_query(&link->conn, query, strlen(query)); + + return 0; +} +/* }}} */ + /* {{{ _free_mysql_result * This wrapper is required since mysql_free_result() returns an integer, and * thus, cannot be used directly @@ -246,8 +249,6 @@ mysql_free_result(mysql_result); } /* }}} */ - - /* {{{ php_mysql_set_default_link */

« previous php.cvs (#12803) next »