anneb Posted February 7, 2009 Share Posted February 7, 2009 Hello. I am fairly new to php. I wrote some code using mysqli coding and it failed. Someone helped me rewrite it with mysql. I have two questions: 1. Is mysqli better to use? What are the differences? 2. How do I install mysqli if I should be using it? I've seen a little info on the internet about installing it, but all of the instructions assume some knowledge I don't seem to have. I guess I need some more detailed instructions. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted February 7, 2009 Share Posted February 7, 2009 1. Is mysqli better to use? What are the differences? MySQLi is short for "MySQL improved", so yes, it's better to use than the old mysql extension. It "was developed to take advantage of new features found in MySQL systems versions 4.1.3 and newer" and it is "strongly recommended" that you use it if you use MySQL 4.1.3+ (source: http://php.net/manual/en/mysqli.overview.php) 2. How do I install mysqli if I should be using it? I've seen a little info on the internet about installing it, but all of the instructions assume some knowledge I don't seem to have. I guess I need some more detailed instructions. Installation instructions are available here: http://php.net/manual/en/mysqli.installation.php On Windows you essentially just need to uncomment the line in php.ini corresponding to that extension. Quote Link to comment Share on other sites More sharing options...
anneb Posted February 7, 2009 Author Share Posted February 7, 2009 Thank you very much for the reply. I am on Linux not windows, on a hosted service. So all I need to do is to make sure that command in in my php.ini file? Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted February 7, 2009 Share Posted February 7, 2009 You can create a file like this: <?php phpinfo(); ?> and run that file via a web browser. If you can find mysqli in that file then it's installed. Otherwise you'll probably have to talk to your host. If you administrate the server then there is likely a package available for your specific distro. On Gentoo you'll have to add the mysqli use flag for the dev-lang/php package for instance. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.