I'm a recent CS graduate and have learned very little on 'web 2.0' type stuff, we mainly focused on Java and C. I want to get into PHP, what would you guys recommend as the best book/website to get started with? There are a lot of them out there, and I don't want to drop 50 bucks on something that will finish with a hello world program. Thanks :-)
Most CMSs close the MySQL connection at the end of the request, which is really meaningless, because PHP will do it anyway.
The close() / mysqli_close() function closes a previously opened database connection.
The purpose of mysqli_close() is also to save computer resources, but another key reason for using it is because there is a limited number of connections that a MySQL server can accept, and if you have several clients holding connections open for no reason then the server may well need to turn away other, waiting ...
Description ¶Explicitly closing open connections and freeing result sets is optional. However, it's a good idea to close the connection as soon as the script finishes performing all of its database operations, if it still has a lot of processing to do after getting the results.
I would avoid books for PHP. MySQL will be reasonably familliar to you from your Database course at college- I have got most of what I need from their Reference Manual.
PHP is pretty odd because there are as you say a million and one tutorials out there, but once you're past the very basics you will probably find once again that you end up going back to their platform documentation more than anything else. You may find the tutorial there is as good a starting point as any.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With