将mysql_query转换为mysqli

i have been working on a project for one of my clients. i used mysql_query but recently i noticed that "mysql_query" will no longer be on php 7. now i need to convert my queries quickly because i should finish the project. is there any way to easily just convert the "mysql_queries" to mysqli? will this work?

mysql_query("insert into ...");

convert to:

$mysqli = new mysqli($db_host, $db_username, $db_password,$db_name);
$mysqli->query("insert into ...");

if yes, can i just use search and replace in notepad++ to convert all queries(insert,update,delete)?