This is pretty good so far for easy conversions with procedural mysqli.
Connection is easier:
$link = mysqli_connect($hostName, $userName, $password, $databaseName);
displayErrMsg(sprintf("Error connecting to the host %s, by user %s on database %s. Cause: %s (%d)", $hostName, $userName, $databaseName, mysqli_connect_error(), mysqli_connect_errno()));
There is no separate database selection mechanism anymore.
As for querying and errors, without going into prepared statements, you can almost use what you have. The mysql_query is replaced with mysqli_query, and the parameters are reversed. So the $link is ALWAYS required and is the first argument.
The error calls are the same, just again with mysqli_error/errno instead of the mysql_error/errno.
So your previous use of $link as a requirement, will actually help you with the conversion process.