Mapping Obsolete MySQL Functions to MySQLi and PDO

MySQL ExtensionMySQLiPDO
mysql_affected_rows mysqli::$affected_rows PDOStatement::rowCount
mysql_client_encoding mysqli::character_set_name
mysql_close mysqli::close Assign NULL to PDO Object
mysql_connect mysqli::__construct PDO::__construct
mysql_create_db Query: CREATE DATABASE
mysql_data_seek mysqli_stmt::data_seek PDO::FETCH_ORI_ABS (?)
mysql_db_name Query: SELECT DATABASE()
mysql_db_query
mysql_drop_db Query: DROP DATABASE
mysql_errno mysqli::$errno PDO::errorCode
mysql_error mysqli::$error_list PDO::errorInfo
mysql_escape_string
mysql_fetch_array mysqli_result::fetch_array PDOStatement::fetch
mysql_fetch_assoc mysqli_result::fetch_assoc PDOStatement::fetch
mysql_fetch_field mysqli_result::fetch_field PDOStatement::getColumnMeta
mysql_fetch_lengths mysqli_result::$lengths PDOStatement::getColumnMeta
mysql_fetch_object mysqli_result::fetch_object PDOStatement::fetch
mysql_fetch_row mysqli_result::fetch_row PDOStatement::fetch
mysql_field_flags mysqli_result::fetch_fields PDOStatement::getColumnMeta
mysql_field_len mysqli_result::fetch_field_direct PDOStatement::getColumnMeta
mysql_field_name mysqli_result::fetch_field_direct PDOStatement::getColumnMeta
mysql_field_seek mysqli_result::field_seek PDOStatement::fetch
mysql_field_table mysqli_result::fetch_field_direct PDOStatement::getColumnMeta
mysql_field_type mysqli_result::fetch_field_direct PDOStatement::getColumnMeta
mysql_free_result mysqli_result::free PDOStatement::closeCursor
mysql_get_client_info mysqli::get_client_info PDO::getAttribute
mysql_get_host_info mysqli::$host_info PDO::getAttribute
mysql_get_proto_info mysqli::$protocol_version
mysql_get_server_info mysqli::$server_info PDO::getAttribute
mysql_info mysqli::$info
mysql_insert_id mysqli::$insert_id PDO::lastInsertId
mysql_list_dbs Query: SHOW DATABASES
mysql_list_fields Query: SHOW COLUMNS
mysql_list_processes mysqli::$thread_id
mysql_list_tables Query: SHOW TABLES
mysql_num_fields mysqli::$field_count PDOStatement::columnCount
mysql_num_rows mysqli_stmt::$num_rows PDOStatement::rowCount
mysql_pconnect mysqli::__construct PDO::__construct
mysql_ping mysqli::ping
mysql_query mysqli::query PDO::query
mysql_real_escape_string mysqli::real_escape_string PDO::quote
mysql_result Combination PDOStatement::fetchColumn
mysql_select_db mysqli::send_query PDO::__construct
mysql_set_charset mysqli::character_set_name PDO::__construct
mysql_stat mysqli::stat PDO::getAttribute
mysql_tablename Query: SHOW TABLES
mysql_thread_id mysqli::$thread_id
mysql_unbuffered_query See Buffering Concepts