Re: cvs: phpdoc /en/reference/mysql/functions [snip]
| From: | Georg Richter | Date: | Fri, 20 Feb 2004 18:23:23 +0000 |
| Subject: | Re: cvs: phpdoc /en/reference/mysql/functions [snip] | ||
| References: | 1 2 3 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969359116@lists.php.net to get a copy of this message | ||
> Converting examples to the "preferred method"s of doing something...
> quotes from the CS:
> > ERROR HANDLING
or die() is ok when connection method fails. Nobody will use a die within a
script e.g. if a query failed! That's bad style.
> > 3. Use single quotes ' when appropriate.
So what is the appropiate way?
a) mysql_query("SELECT col FROM foo WHERE bar='test'");
b) mysql_query('SELECT col FROM foo WHERE bar="test"'');
c) mysql_query('SELECT col FROM foo WHERE bar=\'test\''); ?
Georg