Re: What are the curly brackets around variables in SQL statements for?

From: Date: Wed, 21 Jul 2010 19:27:07 +0000
Subject: Re: What are the curly brackets around variables in SQL statements for?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-307076@lists.php.net to get a copy of this message
On Wed, Jul 21, 2010 at 1:17 PM, Dotan Cohen <dotancohen@gmail.com> wrote: > On Wed, Jul 21, 2010 at 22:07, Daniel Brown <danbrown@php.net> wrote: > > That's just basic variable parsing on the PHP side, it's not > > MySQL-specific. Check out the "variable parsing" heading at > > http://php.net/string . > > > > Thanks, Daniel. It seems unnecessary, then, as the quote character is > not a valid character in a variable name. the single quote is not part of the variable name in the example you posted and further more the curly braces won't be evaluated as part of a variable name unless the string expression is wrapped in double quotes (which probly also evaluates in heredocs & nowdocs). in this case, i would say you are right, the curly braces seem gratuitous; again as dan suggested, read the docs for clarification ... http://us.php.net/manual/en/language.types.string.php#language.types.string.parsing -nathan

« previous php.general (#307076) next »