In answer to your question about mySQLi and mySQL. mySQLi stands for mySQL Improved. Basically, they've reworked it so that it runs faster and better. You can do more with mySQLi than with mySQL, but the databases are the same. The only difference lies in the interation between database and application. Basically, the communication layer was improved.
If you can use the mySQLi extension (which in some cases is better, but not all hosts support), then you use typical calls like:
mysqli_connect()
mysli_query()
mysqli_fetch_array()
Notice the difference to what you tried? You can read more about the mySQLi extension in the
Manual Documentation.