MySQL functionMySQLi proceduralMySQLi Object oriented styleNotesmysql_affected_rows()
mysqli_affected_rows($link)
$mysqli->affected_rows
number of affected rows
mysql_close($link)
mysqli_close($link)
$mysqli->close()
close MySQL connection
mysql_connect($host, $user, $password)
$link = mysqli_connect($host, $user, $password, $database)
$mysqli = new mysqli($host, $user, $password, $database)
open connection to the MySQL Server
mysql_data_seek($result, $i)
mysqli_data_seek($result, $i)
$result->data_seek($i)
move internal result pointer
mysql_db_name($db_list, $i)
retrieve database name from call to mysql_list_dbs
mysql_db_query($database, $query)
select default database
mysql_errno
mysqli_errno($link)
$mysqli->errno
numeric value of error message from last MySQL operation
mysql_error
mysqli_error($link)
$mysqli->error
Returns text of the error from last MySQL operation
mysql_escape_string
mysqli_escape_string
$mysqli->real_escape_string($value)
escape string for mysql_query
mysql_fetch_array($result)
mysqli_fetch_array($result, $type)
$result->fetch_array(MYSQLI_NUM)
$result->fetch_array(MYSQLI_ASSOC)
$result->fetch_array(MYSQLI_BOTH)
fetch a result row as an associative or numeric array, or both
mysql_fetch_assoc
mysqli_fetch_assoc($result)
$result->fetch_assoc()
fetch a result row as an associative array
mysql_fetch_field
mysqli_fetch_field($result)
$result->fetch_field()
get column information from a result and return as an object
mysql_fetch_lengths
mysqli_fetch_lengths($result )
$result->lengths
get the length of each output in a result
mysql_fetch_object
mysqli_fetch_object($result, $class, $params)
$result->fetch_object()
fetch a result row as an object
mysql_fetch_field
mysqli_fetch_field($result)
$finfo = $result->fetch_field()
$result->fetch_field_direct($i)
column information from result as object
mysql_fetch_row
mysqli_fetch_row($result)
$result->fetch_row()
get result row as enumerated array
mysql_field_len
length of the specified field
mysql_field_name
name of the specified field
mysql_field_seek
mysqli_field_seek($result, $number)
$result->field_seek($i)
set result pointer to a specified field offset
mysql_field_table
name of table containing the specified field
mysql_free_result
mysqli_free_result(result)
$result->free
free result memory
mysql_get_client_info
mysqli_get_client_info()
mysqli_get_client_info()
get MySQL client info (no connection required)
mysql_get_host_info
mysqli_get_host_info($link)
$mysqli->host_info
get host info
mysql_get_proto_info
mysqli_get_proto_info($link)
$mysqli->protocol_version
get protocol info
mysql_get_server_info
mysqli_get_server_info($link)
$mysqli->server_info
get server info
mysql_get_server_version
mysqli_get_server_version($link)
$mysqli->server_version
integer version of the MySQL server
mysql_info
mysqli_info($link)
$mysqli->info
get information about the most recent query
mysql_insert_id
mysqli_insert_id($link)
$mysqli->insert_id
get the ID generated from the last query
mysql_list_dbs($link)
$query = "SHOW DATABASES";
$mysqli->query('SHOW DATABASES')
list databases available
mysql_list_tables
$query = "SHOW TABLES";
$mysqli->query('SHOW TABLES')
List tables in a MySQL database
mysql_num_fields
mysqli_num_fields($result)
$result->field_count
number of fields in result
mysql_num_rows
mysqli_num_rows($result)
$result->num_rows
number of rows in result
mysql_query($query)
mysqli_query($link, $query)
$mysqli->query($query)
execute a MySQL query
mysql_real_escape_string
mysqli_real_escape_string($link)
$mysqli->real_escape_string
escape special characters in a string
mysql_result
get result data
mysql_select_db($database, $link)
mysqli_select_db($link, $database)
$mysqli->select_db($database)
select a MySQL database
mysql_set_charset
mysqli_set_charset($link, $charset)
$mysqli->set_charset("utf8")
set the client character set
mysql_stat
mysqli_stat($link)
$mysqli->stat()
get current system status
mysql_tablename
get table name of field
mysql_thread_id
mysqli_thread_id($link)
$mysqli->thread_id
the current thread ID
Displaying first 50 comments.
1. Posted By: David Hay - - July 6, 2018, 7:35 am 2. Posted By: Jeff - - July 6, 2018, 4:28 pm 3. Posted By: aisiahmk - - July 18, 2018, 2:48 am
convert work for login but update database not work
Sorry already solve. My fault, not your converter. Your converter is the best.
Thanks for this great tool! I have converted a website today and it runs now fine on PHP 7.1. (was 5.4)
GREAT!
My website is - sattamatka.store can you help me for upgrade my version 5.6 to 7.2
Saved me several hours of work, appreciate it. Tipped you guys $10, well deserved.
Very good tool! Just a laugh - everywhere, mysql connectin is called $ mysqli (and for instance, it's called $ conn) and must be searched and replaced manually. Just specify this explicitly, otherwise the scripts do not work.
This is very helpful to me. Great work! It help me in my thesis fro converting outdated sdk.
Hi There, me again, almost there now, just getting mysql_numrows when it should be mysql_num_rows. Thanks again, great tool. Also, would be super handy to add a field for $mysqli connection variable name in output.
I mean mysqli_num_rows()
Can't convert code over 600 lines (even after changing max length from inspect element)
Thanks. It works almost well, but I've noticed that my code has undefined variable names. I've converted over 50 files and many of them had $mysqli variables used but there are no $mysqli variables declared in any of files. I just replaced $mysqli variable with $link in the whole project and I hope it will be fixed now.
Very disappointed with this converter. Many of my files did not convert properly. Had to re-do the work manually all over again.
Thank you very much for your excellent work. This converter is absolutely Great. Well Done.
Please what can i do to rectify this Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given
Thanks for your response.
Another glitch:
mysql_field_name( is not being converted to mysqli_field_name(
Thank you for saving me 2 minutes of my life, lol