[thelist] MySQL & PHP in English
Kae Verens
kverens at contactjuggling.org
Tue Feb 25 07:12:00 CST 2003
rudy wrote:
>>... and not something that provides solutions to problems that don't
> exist!
> actually, i already have one -- hi glasshaus! (they read thelist, too)
you know - I was just about to mention their book "Dreamweaver MX: PHP
Web Development", which I'll be working through carefully to learn
Dreamweaver (I usually use 'vi', but that's annoying my co-workers). The
MySQL and PHP introductions are very clear - a lot clearer than some
other books.
personally, I believe that the best book of PHP/MySQL would be simply a
huge list of optimization tips covering efficient code writing, writing
modular code (PHP tends to be write once, throw away), and more in depth
stuff like the difference between " and ' (it sometimes annoys me to see
so many people misusing them), and proper usage of the ternary operator.
<tip type="ternary operators in PHP">
if you are developing online and offline at the same time, and want to
use different configuration options based on whether you're on or off,
you can use the ternary operator to write clear code which describes the
difference. For example:
$online=(ereg('.local',$HTTP_HOST))?0:1;
$dirroot=($online)? '/dir/to/online/site/' : '/dir/to/test/site/' ;
oh - here's a nifty JavaScript soliloquay intro:
theQuestion=(2*b||!2*b)?that:this;
</tip>
--
Kae Verens _______\_ webworks.ie
pay: www.webworks.ie _____\\__ webhosts
play: www.contactjuggling.org ___\\\___ design
kae: kverens.contactjuggling.org _\\\\____ code
More information about the thelist
mailing list