quoting the macromedia guy:
"And finally, if you are done with the recordset, you must free the results and close the connection:
<?php
mysql_free_result($rsGetOrders);
mysql_close($connMysqlbookstore);
?> "
You are not longer required to close your connections and free your results when using PHP.
Another thing: thanks to PEAR's DB abstraction layer you are not that dependent of your db choice. It's also good because you'll need less code when asking for a db connection. So don't worry, your code wont look as ugly as he's trying to make it look.
As a side note, he says:
"Another thing you'll notice from the code is that the database MySQL is specified. The PHP code will not work with any other database. You can't simply upgrade your database to MS SQL Serverβbecause the code will not work."
Well, does anyone considers that as an UPGRADE? this makes me think about the reliability of his assertions.
- About the mail:
This is all you need to send an email:
$status = mail ( $to, $subject, $body, "From:$from\nReply-To:$from" );
This guy spent 10 lines of ugly code to make it look that bad.
You can also use an include file that sets your $body variable. It's easy.
Anyway i recomend you look at PEAR again since they may have some cool functionalities ( i admit the mail tag is cool)
- Conditional includes.
I use it very frequently, there's no problem with that.
Well i wont extend on the rest of the article. Let me just say that PHP OOP is evolving towards the kind of necessities CF is adressing right now, and MORE (much more).
The thing is. CF reduces you coding time ... sometimes ... a bit.
π
Let me put it this way: If you want an application that scales easy time wont be saved by choosing one Language or Another. Most of the time will be spent defining the achitecture. Actually it will be easier to overcome a larger number of problems using PHP since it has TONS of features to help you out, that's one thing i've missed coding CF.
You may want to understand this guy's "productivity" as how fast can you code a one in a life-time non-scalable solution.
Dont take everything he says for granted. I'm sure CF is great, but I still prefer PHP. It simply rocks