Re: MySQL examples need review

From: Date: Sun, 23 Dec 2001 11:40:52 +0000
Subject: Re: MySQL examples need review
References: 1 2  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969340294@lists.php.net to get a copy of this message
> Can you add anything to our coding conventions > discussion? First of all, I'm after PEAR coding standard in examples. However, there are some elements which are not covered by PEAR docs: 1. Always use the same values for server, userneme, password and database name, when connecting to database. 2. Always use "or die(...)" in database examples. 3. Use print 'foo' when foo doesn't need to be parsed. 4. Use lowercase in HTML tags. 5. Don't use "$query='...'; mysql_query($query)" when its not needed. 6. Don't use a variable which in not set in example (see $user in mysql_field_name example). 7. Decide whether to use echo or print (and printf) for output. I preffer echo. slawek-

« previous php.doc (#969340294) next »