Check out example codes for "mysql_error replacement". It will help you in understanding the concepts better.

Code Example 1

mysql_error will be replaced by mysqli_error and/or mysqli_connect_error, depending on the context
mysql_query will be replaced by mysqli_query
eg:
mysql_query($query)
becomes 
mysqli_query($link, $query)

Learn ReactJs, React Native from akashmittal.com