The table below represents the PHP functions Mapping/Comparison between CUBRID and MySQL. There may be new functions introduced since this document has been last updated. If so, please let us know either on Twitter or on CUBRID Forum. We will update the functions right away.
This document reflects the functions published on CUBRID PHP.net documentation http://php.net/manual/en/book.cubrid.php and on MySQL PHP.net documentation http://php.net/manual/en/book.mysql.php.
The CUBRID-MySQL functions marked with green color match with each other, having the mysql_ prefix changed to cubrid_.
The CUBRID-MySQL functions marked with red color do not perfectly match with each other, though perform same tasks.
| CUBRID Functions | MySQL Functions | |
|---|---|---|
| cubrid_affected_rows ( [ resource $req_identifier ] ) |
mysql_affected_rows ( [ resource $link_identifier ] ) |
|
| cubrid_data_seek ( resource $req_identifier , int $row_number ) |
mysql_data_seek (resource $result, int $row_number) |
|
| cubrid_move_cursor ( resource $req_identifier , int $offset [, int $origin = CUBRID_CURSOR_CURRENT ] ) |
||
| cubrid_fetch_assoc ( resource $result ) |
mysql_fetch_assoc (resource $result) |
|
| cubrid_fetch_field ( resource $result [, int $field_offset = 0 ] ) |
mysql_fetch_field (resource $result [, int $field_offset = 0 ]) |
|
| cubrid_fetch_lengths ( resource $result ) |
mysql_fetch_lengths (resource $result) |
|
| cubrid_fetch_row ( resource $result ) |
mysql_fetch_row (resource $result) |
|
| cubrid_fetch_object ( resource $result [, string $class_name [, array $params ]] )CUBRID 8.3.1 |
mysql_fetch_object (resource $result [, string $class_name [, array $params ]]) |
|
| cubrid_fetch_array ( resource $result [, int $type = CUBRID_BOTH ] ) |
mysql_fetch_array (resource $result [, int $result_type = MYSQL_BOTH ]) |
|
| cubrid_field_flags ( resource $result , int $field_offset ) |
mysql_field_flags (resource $result, int $field_offset) |
|
| cubrid_field_len ( resource $result , int $field_offset ) |
mysql_field_len (resource $result, int $field_offset) |
|
| cubrid_field_name ( resource $result , int $field_offset ) |
mysql_field_name (resource $result, int $field_offset) |
|
| cubrid_column_names ( resource $req_identifier ) |
||
| cubrid_field_seek ( resource $result [, int $field_offset = 0 ] ) |
mysql_field_seek (resource $result, int $field_offset) |
|
| cubrid_field_table ( resource $result , int $field_offset ) |
mysql_field_table (resource $result, int $field_offset) |
|
| cubrid_field_type ( resource $result , int $field_offset ) |
mysql_field_type (resource $result, int $field_offset) |
|
| cubrid_column_types ( resource $req_identifier ) |
||
| cubrid_free_result ( resource $req_identifier ) |
mysql_free_result (resource $result) |
|
| cubrid_close_request ( resource $req_identifier ) |
||
| cubrid_get_client_info ( void ) |
mysql_get_client_info (string mysql_get_client_info ( void)) |
|
| cubrid_version ( void ) |
||
| cubrid_get_server_info ( resource $conn_identifier ) |
mysql_get_server_info ([ resource $link_identifier]) |
|
| cubrid_insert_id ([ resource $conn_identifier ] ) |
mysql_insert_id ([ resource $link_identifier ]) |
|
| cubrid_list_dbs ( resource $conn_identifier ) |
mysql_list_dbs ([ resource $link_identifier]) |
|
| cubrid_num_fields ( resource $result ) |
mysql_num_fields (resource $result) |
|
| cubrid_num_cols ( resource $req_identifier ) |
||
| cubrid_real_escape_string ( string $unescaped_string [, resource $conn_identifier ] ) |
mysql_real_escape_string (string $unescaped_string [, resource $link_identifier ]) |
|
| cubrid_result ( resource $result , int $row [, mixed $field = 0 ] ) |
mysql_result (resource $result, int $row [, mixed $field = 0 ]) |
|
| cubrid_unbuffered_query ( string $query [, resource $conn_identifier ] ) |
mysql_unbuffered_query (string $query [, resource $link_identifier ]) |
|
| cubrid_db_name ( array $result , int $index )CUBRID 8.3.1 |
mysql_db_name (resource $result, int $row [, mixed $field ]) |
|
| cubrid_ping ([ resource $conn_identifier ] )CUBRID 8.3.1 |
mysql_ping ([ resource $link_identifier ]) |
|
| cubrid_execute resource cubrid_execute ( resource $conn_identifier , string $SQL [, int $option ] ) bool cubrid_execute ( resource $request_identifier [, int $option ] ) |
mysql_query (string $query [, resource $link_identifier ]) |
|
| cubrid_query ( string $query [, resource $conn_identifier ] ) |
||
| cubrid_error_msg ( void ) |
mysql_error ([resource $link_identifier]) |
|
| cubrid_error ([ resource $connection ] ) |
||
| cubrid_error_code ( void ) |
mysql_errno ([resource $link_identifier]) |
|
| cubrid_errno ([ resource $conn_identifier ] ) |
||
| cubrid_get_charset ( resource $conn_identifier ) |
mysql_client_encoding (resource $link_identifier) |
|
| cubrid_client_encoding ( [ resource $conn_identifier ] ) |
||
| cubrid_disconnect ( resource $conn_identifier ) |
mysql_close (resource $link_identifier) |
|
| cubrid_close ([ resource $conn_identifier ] ) |
||
| cubrid_num_rows ( resource $result ) |
mysql_num_rows (resource $result) |
|
| cubrid_connect ( string $host , int $port , string $dbname [, string $userid [, string $passwd ]] ) |
mysql_connect ([ string $server = ini_get("mysql.default_host") [, string $username = ini_get("mysql.default_user") [, string $password = ini_get("mysql.default_password") [, bool $new_link = false [, int $client_flags = 0 ]]]]]) |
|
| cubrid_connect_with_url ( string $conn_url [, string $userid [, string $passwd ]] ) |
||
| cubrid_pconnect ( string $host , int $port , string $dbname [, string $userid [, string $passwd ]] ) |
mysql_pconnect ( [ string $server = ini_get("mysql.default_host") [, string $username = ini_get("mysql.default_user") [, string $password = ini_get("mysql.default_password") [, int $client_flags ]]]] ) |
|
| cubrid_pconnect_with_url ( string $conn_url [, string $userid [, string $passwd ]] ) |
||
| cubrid_schema ( resource $conn_identifier , int $schema_type [, string $class_name [, string $attr_name ]] ) |
mysql_list_fields (string $database_name, string $table_name [, resource $link_identifier ]) |
|
| mysql_list_tables (string $database [, resource $link_identifier ]) |
||
| cubrid_get_class_name ( resource $conn_identifier , string $oid ) |
mysql_tablename (resource $result, int $i) |
| MySQL Functions | ||
|---|---|---|
| mysql_create_db (string $database_name [, resource $link_identifier ]) |
||
| mysql_db_query (string $database, string $query [, resource $link_identifier ]) |
||
| mysql_drop_db (string $database_name [, resource $link_identifier ]) |
||
| mysql_get_host_info ([ resource $link_identifier ]) |
||
| mysql_get_proto_info ([ resource $link_identifier ]) |
||
| mysql_info ([ resource $link_identifier]) |
||
| mysql_list_processes ([ resource $link_identifier ]) |
||
| mysql_select_db (string $database_name [, resource $link_identifier ]) |
||
| mysql_set_charset (string $charset [, resource $link_identifier ]) |
||
| mysql_stat ([ resource $link_identifier ]) |
||
| mysql_thread_id ([ resource $link_identifier ]) |
||
| This function has been DEPRECATED as of PHP 5.3.0. Thus, will not be implemented in CUBRID for MySQL compatibility. | mysql_escape_string ([ string $unescaped_string ]) |
| CUBRID Functions | ||
|---|---|---|
| cubrid_lob_get ( resource $conn_identifier , string $SQL ) |
New since CUBRID 8.3.1 | |
| cubrid_lob_close ( array $lob_identifier_array ) |
New since CUBRID 8.3.1 | |
| cubrid_lob_size ( resource $lob_identifier ) |
New since CUBRID 8.3.1 | |
| cubrid_lob_export ( resource $conn_identifier , resource $lob_identifier , string $path_name ) |
New since CUBRID 8.3.1 | |
| cubrid_lob_send ( resource $conn_identifier , resource $lob_identifier ) |
New since CUBRID 8.3.1 | |
| cubrid_bind ( resource $req_identifier , mixed $bind_param , mixed $bind_value [, string $bind_value_type ] ) |
||
| cubrid_commit ( resource $conn_identifier ) |
||
| cubrid_get_autocommit ( resource $conn_identifier ) |
New since CUBRID 8.4.0 | |
| cubrid_next_result ( resource $result ) |
New since CUBRID 8.4.0 | |
| cubrid_prepare ( resource $conn_identifier , string $prepare_stmt [, int $option = 0 ] ) |
||
| cubrid_rollback ( resource $conn_identifier ) |
||
| cubrid_close_prepare ( resource $req_identifier ) |
||
| cubrid_col_get ( resource $conn_identifier , string $oid , string $attr_name ) |
||
| cubrid_col_size ( resource $conn_identifier , string $oid , string $attr_name ) |
||
| cubrid_current_oid ( resource $req_identifier ) |
||
| cubrid_drop ( resource $conn_identifier , string $oid ) |
||
| cubrid_error_code_facility ( void ) |
||
| cubrid_fetch ( resource $result [, int $type = CUBRID_BOTH ] ) |
||
| cubrid_get ( resource $conn_identifier , string $oid [, mixed $attr ] ) |
||
| cubrid_get_db_parameter ( resource $conn_identifier ) |
||
| cubrid_is_instance ( resource $conn_identifier , string $oid ) |
||
| cubrid_lock_read ( resource $conn_identifier , string $oid ) |
||
| cubrid_lock_write ( resource $conn_identifier , string $oid ) |
||
| cubrid_put ( resource $conn_identifier , string $oid [, string $attr ], mixed $value ) |
||
| cubrid_seq_drop ( resource $conn_identifier , string $oid , string $attr_name , int $index ) |
||
| cubrid_seq_insert ( resource $conn_identifier , string $oid , string $attr_name , int $index , string $seq_element ) |
||
| cubrid_seq_put ( resource $conn_identifier , string $oid , string $attr_name , int $index , string $seq_element ) |
||
| cubrid_set_add ( resource $conn_identifier , string $oid , string $attr_name , string $set_element ) |
||
| cubrid_set_autocommit ( resource $conn_identifier , bool $mode ) |
New since CUBRID 8.4.0 | |
| cubrid_set_db_parameter ( resource $conn_identifier , int $param_type , int $param_value ) |
New since CUBRID 8.4.0 | |
| cubrid_set_drop ( resource $conn_identifier , string $oid , string $attr_name , string $set_element ) |
||
| cubrid_load_from_glo (resource $conn_identifier, string $oid, string $file_name) |
Dropped since CUBRID 8.3.1 | |
| cubrid_new_glo (resource $conn_identifier, string $class_name, string $file_name) |
Dropped since CUBRID 8.3.1 | |
| cubrid_save_to_glo (resource $conn_identifier, string $oid, string $file_name) |
Dropped since CUBRID 8.3.1 | |
| cubrid_send_glo (resource $conn_identifier, string $oid) |
Dropped since CUBRID 8.3.1 |
Installation Instructions [CUBRID PHP Driver Installation Instructions] Latest News CUBRID Driver Improvements in CUBRID 8.4.1 - Blog post Tutorials and Guides What ...
2 weeks ago
Official CUBRID PHP Driver is available as a PECL package. Download [CUBRID PHP Driver Installation Instructions|Installation Instructions] [CUBRID PHP Tutor...
2 months ago
Official CUBRID PHP Driver is available as a PECL package. Download Installation Instructions Latest News, Guides and Tutorials PHP specific Questions and Answers...
3 months ago
Installation Instructions [CUBRID PHP Driver Installation Instructions] Tutorials and Guides What is Tread-safe or Non-thread-safe in PHP? - Stackoverflow [Install C...
3 months ago