Re: From: Newman, using " and ' or ` in My Sql

From: Date: Sat, 16 Mar 2002 05:43:58 +0000
Subject: Re: From: Newman, using " and ' or ` in My Sql
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-88735@lists.php.net to get a copy of this message
In article <php.general-88732@news.php.net>, php-general@gremlins.com.hk says... > On Saturday 16 March 2002 13:08, Philip J. Newman wrote: > > A few of us folk at PhilipNZ.com would like to know about using " and ' or > > ` in My Sql when calling information from the database. > > > > we have always used > > > > $sql = "SELECT * FROM hyperlinks ORDER BY > > clicks DESC LIMIT 0, 10"; > > > > but where told that the ` was not required > > > > $sql = "SELECT * FROM hyperlinks ORDER BY clicks DESC LIMIT 0, 10"; > > > > Any Comments on this? > > Yes, this should be posted to php-db. > > For simple cases are not needed. It is only used if your > column names > contain weird characters, spaces for instance, then: > > SELECT First Name FROM Address; And of course single quotes (') should be used to delimit text data being inserted into CHAR type fields. But you knew that, of course. -- David Robley Temporary Kiwi! Quod subigo farinam

« previous php.general (#88735) next »