Mudsaf Posted August 18, 2013 Share Posted August 18, 2013 (edited) Hello, i'm just wondering is MySQLi much different than MySQL? I have basic knowledge of MySQL and it seemed pretty similar & easy. Example this <?php$con = mysqli_connect("<hostserver>","<user>","<pass>","<database>") or die("<error>");$result = $con->query("SELECT userName FROM <users>") or die("<query_failed>");while ($row = mysqli_fetch_array($result)) {echo $row['<username>'] . "<br>";}if (isset($con)) {mysqli_close($con) or die("<some random closing problems>");}?> PS: I know its improved extension of MySQL, but i wan't to know if there is major changes in code. Ah i even might consider PDO since alot of databases supports it, would you suggest that? http://net.tutsplus.com/tutorials/php/pdo-vs-mysqli-which-should-you-use/ Edited August 18, 2013 by Mudsaf Link to comment Share on other sites More sharing options...
birbal Posted August 19, 2013 Share Posted August 19, 2013 (edited) codewise they are very similiar if not exact same. Procedural style has most similarity. learning PDO is worthy. I personally use PDO even though most commonly RDBMS i use is mysql. Edited August 19, 2013 by birbal 1 Link to comment Share on other sites More sharing options...
Mudsaf Posted August 19, 2013 Author Share Posted August 19, 2013 So PDO shall it be, thanks for reply. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now