Re: Re: PHP and MySQL SELECT COUNT (*)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



While it's true that '.' concatenates and ',' is a list separator, The
comma is actually more appropriate in this instance since you are just
outputting each piece.  It saves the overhead of concatenation before
output.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Nathan Rixham wrote:
>
> 6: " vs '
> when you use " php will parse the enclosed string for variables, when
> you use ' it won't; so ' leads for faster code, and also encourages
> you to code strongly by closing strings and concatenating variables.
> Further it allows you to use valid html " around attributes rather
> than the invalid '
>
> 7: , vs .
> there is no vs :) to concatenate we use . (period) not , (comma)
>
> so for 6 & 7..
> echo '<td>' . $i['servername'] . '</td>';
>
> I'm going to stop there, hope it helps a little bit; and I won't go
> any further as half the fun is learning; so you finding out how to
> save time on queries and write your own db handlers etc is not my
> domain I reckons
>
> Regards
>
> nathan
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux