I read more than once that is better to use mysqli and than mysql.
I would like to know:
- I'm using WAMP for my local server and some share server for my online sites. what do i need to check on php.ini in order to be sure that mysqli will works? 
- below is my db connection and query code. how would it looks like using mysqli? 
$con = @mysql_connect ("localhost", "username", "pass"); 
if(!$con)
    exit("Unable to connect to the Database server");
    $db2 = @mysql_select_db("DB_NAME");
    if(!$db2)
        exit("Unable to connect to the Database");
    $query = mysql_query("SELECT somme_filed FROM some_table");
    while ($index= mysql_fetch_array($query ))
    {
        ....
    }
- most of my site was written in mysql. Do I really need to change all the code to mysqli? Is it really so important?
 
     
    