$v ) $HTTP_POST_VARS[ $k ] = $v; foreach ( $_GET as $k => $v ) $HTTP_GET_VARS[ $k ] = $v; function mysql_affected_rows( $link_identifier = NULL ){ // Get number of affected rows in previous MySQL operation if ( ! $link_identifier ) $link_identifier = $GLOBALS['GSAMP_BC_MYSQLCON']; return mysqli_affected_rows( $link_identifier ); } function mysql_close( $link_identifier = NULL ){ // Close MySQL connection if ( ! $link_identifier ) $link_identifier = $GLOBALS['GSAMP_BC_MYSQLCON']; return mysqli_close( $link_identifier ); } function mysql_connect( $server, $username, $password ){ // Open a connection to a MySQL Server $mysqlCon = mysqli_connect( $server, $username, $password ); $GLOBALS['GSAMP_BC_MYSQLCON'] = $mysqlCon; return $mysqlCon; } function mysql_error( $link_identifier ){ // Returns the text of the error message from previous MySQL operation if ( ! $link_identifier ) $link_identifier = $GLOBALS['GSAMP_BC_MYSQLCON']; return mysqli_error( $link_identifier ); } const MYSQL_ASSOC = MYSQLI_ASSOC; const MYSQL_NUM = MYSQLI_NUM; const MYSQL_BOTH = MYSQLI_BOTH; function mysql_fetch_array( $result, $result_type = MYSQL_BOTH ){ // Fetch a result row as an associative array, a numeric array, or both return mysqli_fetch_array( $result, $result_type ); } function mysql_fetch_assoc( $result ){ // Fetch a result row as an associative array return mysqli_fetch_assoc( $result ); } function mysql_fetch_object( $result, $class_name = "stdClass", $params = array() ){ // Fetch a result row as an object return mysqli_fetch_object( $result, $class_name, $params ); } function mysql_fetch_row( $result ){ // Get a result row as an enumerated array return mysqli_fetch_row( $result ); } function mysql_free_result( $result ){ // Free result memory mysqli_free_result( $result ); return TRUE; } function mysql_insert_id( $link_identifier = NULL ){ // Get the ID generated in the last query if ( ! $link_identifier ) $link_identifier = $GLOBALS['GSAMP_BC_MYSQLCON']; return mysqli_insert_id( $link_identifier ); } function mysql_num_rows( $result ){ // Get number of rows in result return mysqli_num_rows( $result ); } function mysql_query( $query, $link_identifier = NULL ){ // Send a MySQL query if ( ! $link_identifier ) $link_identifier = $GLOBALS['GSAMP_BC_MYSQLCON']; return mysqli_query( $link_identifier, $query ); } function mysql_real_escape_string( $unescaped_string, $link_identifier =NULL ){ // Escapes special characters in a string for use in an SQL statement if ( ! $link_identifier ) $link_identifier = $GLOBALS['GSAMP_BC_MYSQLCON']; return mysqli_real_escape_string( $link_identifier, $unescaped_string ); } function mysql_result( $result, $row, $field = 0 ){ // Get result data // Format "table.field" is not supported try { mysqli_data_seek( $result, $row ); if ( is_numeric( $field ) ){ $row = mysqli_fetch_row( $result ); } else { $row = mysqli_fetch_assoc( $result ); } return $row[ $field ]; } catch (Exception $e) { return False; } } function mysql_select_db( $database_name, $link_identifier = NULL ){ // Select a MySQL database if ( ! $link_identifier ) $link_identifier = $GLOBALS['GSAMP_BC_MYSQLCON']; return mysqli_select_db( $link_identifier, $database_name ); } function split( $pattern, $string, $limit=-1 ){ return preg_split( "/" . str_replace( "/", "\\/", $pattern ) . "/", $string, $limit ); }