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) Show 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 4. Posted By: Jeff - - July 18, 2018, 4:09 am 5. Posted By: aisiahmk - - July 19, 2018, 2:22 pm Sorry already solve. My fault, not your converter. Your converter is the best. 6. Posted By: Jeff - - July 19, 2018, 4:46 pm 7. Posted By: Kasper222 - - August 14, 2018, 3:47 am 8. Posted By: Jeff - - August 14, 2018, 6:26 am 9. Posted By: Jeff D - - October 4, 2018, 9:45 pm 10. Posted By: Jeff - - October 5, 2018, 11:25 am 11. Posted By: Voklee - - October 29, 2018, 2:26 pm Thanks for this great tool! I have converted a website today and it runs now fine on PHP 7.1. (was 5.4) 12. Posted By: Jeff - - October 30, 2018, 8:47 am 13. Posted By: Naresh - - November 23, 2018, 6:30 pm My website is - sattamatka.store can you help me for upgrade my version 5.6 to 7.2 14. Posted By: Terry - - November 27, 2018, 11:38 pm 15. Posted By: Jeff - - November 28, 2018, 9:09 am 16. Posted By: Terry - - November 28, 2018, 12:48 pm 17. Posted By: Mads - - December 2, 2018, 12:59 pm 18. Posted By: David - - December 7, 2018, 9:24 am Saved me several hours of work, appreciate it. Tipped you guys $10, well deserved. 19. Posted By: Jeff - - December 7, 2018, 6:40 pm 20. Posted By: kalchev - - December 21, 2018, 3:34 am 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. 21. Posted By: code flow - - December 24, 2018, 7:26 am 22. Posted By: Jeff - - December 24, 2018, 10:04 am 23. Posted By: tineC - - March 23, 2019, 12:13 am This is very helpful to me. Great work! It help me in my thesis fro converting outdated sdk. 24. Posted By: Jeff - - March 23, 2019, 10:39 am 25. Posted By: dave - - March 27, 2019, 11:28 pm 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. 26. Posted By: dave - - March 27, 2019, 11:30 pm I mean mysqli_num_rows() 27. Posted By: Jeff - - March 28, 2019, 11:25 am 28. Posted By: L - - April 23, 2019, 4:38 am Can't convert code over 600 lines (even after changing max length from inspect element) 29. Posted By: Jeff - - April 23, 2019, 10:17 am 30. Posted By: L - - April 23, 2019, 10:21 am 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. 31. Posted By: Bilal - - April 25, 2019, 4:45 am Very disappointed with this converter. Many of my files did not convert properly. Had to re-do the work manually all over again. 32. Posted By: Jeff - - April 25, 2019, 9:53 am 33. Posted By: Jeff - - April 26, 2019, 1:55 pm 34. Posted By: tey - - April 26, 2019, 8:28 pm 35. Posted By: Tey - - April 26, 2019, 8:30 pm Thank you very much for your excellent work. This converter is absolutely Great. Well Done. 36. Posted By: Jeff - - April 27, 2019, 12:00 pm 37. Posted By: Rob - - April 27, 2019, 8:49 pm 38. Posted By: Jeff - - April 28, 2019, 10:00 am 39. Posted By: Ali - - May 3, 2019, 6:40 pm Please what can i do to rectify this Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given 40. Posted By: Jeff - - May 6, 2019, 10:39 am 41. Posted By: Ali - - May 7, 2019, 9:38 am Thanks for your response. 42. Posted By: Andrew - - May 14, 2019, 12:38 pm 43. Posted By: Andrew - - May 16, 2019, 8:54 am Another glitch: 44. Posted By: Jeff - - May 16, 2019, 10:50 am 45. Posted By: Andrew - - May 16, 2019, 12:28 pm 46. Posted By: Jeff - - May 16, 2019, 12:42 pm 47. Posted By: nyasoso munjo - - June 7, 2019, 12:13 am 48. Posted By: Jeff - - June 7, 2019, 9:32 am 49. Posted By: Daniel Castro - - June 26, 2019, 12:58 pm Thank you for saving me 2 minutes of my life, lol 50. Posted By: old code shark - - July 10, 2019, 9:54 am How can I convert MySQL database to MySQLi in PHP?To open new connection to the database with MySQLi you need to create new instance of MySQLi class. $mysqli = new \mysqli($host, $user, $password, $dbName); $mysqli->set_charset('utf8mb4');
Can I use both MySQL and MySQLi?It is possible to include both MySQL and MySQLi when connecting to a single database, but it is incredibly delicate and with large amounts of data being passed through it can get very messy and hard to control. it is best to use MySQLi in general in my opinion because it is much more secure and up to date.
Does PHP 5.6 support Mysql_connect?It's still available in 5.6.
Is MySQLi better than MySQL?MySQLi supports both procedural interfaces and object oriented interfaces while MySQL supports only procedural interfaces. MySQLi supports stored procedure but MySQL does not. There is enhanced security and improved debugging features in MySQLi where this is comparatively lagging in MySQL.
|