Re: MySQL examples need review
| From: | Jan Lehnardt | Date: | Sun, 23 Dec 2001 18:03:20 +0000 |
| Subject: | Re: MySQL examples need review | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969340305@lists.php.net to get a copy of this message | ||
Hi,
On Sun, 23 Dec 2001 18:38:45 +0100
"Gabor Hojtsy" <goba@php.net> wrote:
> What do others think about that?
I give a +1 for adapting the PEAR coding standard for Manual examples.
Some things must be recognized. At first PEAR does have a excellent
error handling, but it is to complex to intoduce it inside of examples
in the PHP manual. Nevertheless error handling is needed. I vote for the
'or die()' construct where needed (e.g. mysql_connect() and friends). As
Slawomir Pucia said some mails ago, we should be consistent about using
' or " for strings (+1 for ' where no metachars or variables need to be
parsed). $variables shoud be concatenated with '. instead of using "$var
strng". Lowercase <html>-tags. "Don't use "$query='...';
mysql_query($query)" when its not needed." Be consistent with echo or
print(f) (+1 for echo).
> Merry Christmas and a Happy new year to you Egon, and
> to everybody reading these mails. :)
the same to you.
Jan
--
Q: Thank Jan? A: http://geschenke.an.dasmoped.net/