Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php Subject: Re: Where did the parens come from Date: Tue, 11 Jul 2017 18:05:22 +0200 Lines: 28 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net jeofWFDC3dWzK6c+WzqiMgIem0Q5Kko9+tSHVi0/6qbB4hnQac Cancel-Lock: sha1:ncB/mf6L8yEk+lxsig4E5oG/vJ0= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 In-Reply-To: Content-Language: en-GB Xref: csiph.com comp.lang.php:17536 On 07/11/17 13:31, bill wrote: > On 7/10/2017 3:17 PM, J.O. Aho wrote: >> On 07/10/17 20:19, bill wrote: >> >>> '$connection->real_escape_string({$postData['hName']})' >>> '(my name)' >>> The sql produced has parens around all the values to be saved (and it >>> shouldn't) and I can't figure out where they come form. >> >> I would guess it's your { and } which generates the parentheses, try with >> >> "$connection->real_escape_string($postData['hName'])" >> > > This results in: > PHP Parse error: syntax error, unexpected '$connection' (T_VARIABLE) > in > /home/michigan/public_html/IrishWolfhoundRescue.org/application/dogs-basic.php > on line 268 Maybe it's better to have it outside the string: . $connection->real_escape_string($postData['hName']) . ", " -- //Aho