Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #17536

Re: Where did the parens come from

From "J.O. Aho" <user@example.net>
Newsgroups comp.lang.php
Subject Re: Where did the parens come from
Date 2017-07-11 18:05 +0200
Message-ID <eskba2F7i9U1@mid.individual.net> (permalink)
References <ok0gfs$1pkp$1@gioia.aioe.org> <esi26tFeq43U1@mid.individual.net> <ok2cv5$h9s$2@gioia.aioe.org>

Show all headers | View raw


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

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Where did the parens come from bill <william@TechServSys.com> - 2017-07-10 14:19 -0400
  Re: Where did the parens come from "J.O. Aho" <user@example.net> - 2017-07-10 21:17 +0200
    Re: Where did the parens come from bill <william@TechServSys.com> - 2017-07-11 07:31 -0400
      Re: Where did the parens come from "J.O. Aho" <user@example.net> - 2017-07-11 18:05 +0200
  Re: Where did the parens come from Jerry Stuckle <jstucklex@attglobal.net> - 2017-07-10 18:53 -0400
    Re: Where did the parens come from bill <william@TechServSys.com> - 2017-07-11 07:29 -0400
    Re: Where did the parens come from bill <william@TechServSys.com> - 2017-07-11 07:33 -0400
      Re: Where did the parens come from Jerry Stuckle <jstucklex@attglobal.net> - 2017-07-11 09:12 -0400
        Re: Where did the parens come from bill <william@TechServSys.com> - 2017-07-11 10:26 -0400
          Re: Where did the parens come from "Peter H. Coffin" <hellsop@ninehells.com> - 2017-07-11 12:55 -0500
            Re: Where did the parens come from "Peter H. Coffin" <hellsop@ninehells.com> - 2017-07-11 13:52 -0500
          Re: Where did the parens come from Jerry Stuckle <jstucklex@attglobal.net> - 2017-07-11 14:57 -0400
            Re: Where did the parens come from bill <william@TechServSys.com> - 2017-07-12 08:03 -0400
            Re: Where did the parens come from "Peter H. Coffin" <hellsop@ninehells.com> - 2017-07-12 13:51 -0500
              Re: Where did the parens come from bill <william@TechServSys.com> - 2017-07-13 07:37 -0400
  Re: Where did the parens come from "R.Wieser" <address@not.available> - 2017-07-11 08:40 +0200

csiph-web