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


Groups > comp.lang.php > #17541

Re: Where did the parens come from

From "Peter H. Coffin" <hellsop@ninehells.com>
Newsgroups comp.lang.php
Subject Re: Where did the parens come from
Date 2017-07-12 13:51 -0500
Message-ID <slrnomcruc.4ah.hellsop@nibelheim.ninehells.com> (permalink)
References (1 earlier) <ok108o$pgf$1@jstuckle.eternal-september.org> <ok2d24$h9s$3@gioia.aioe.org> <ok2ik8$tjc$1@jstuckle.eternal-september.org> <ok2n6c$1207$1@gioia.aioe.org> <ok36qf$658$1@jstuckle.eternal-september.org>

Show all headers | View raw


On Tue, 11 Jul 2017 14:57:31 -0400, Jerry Stuckle wrote:
> OK, I was able to duplicate it here.  Very interesting.  I haven't run
> into this before because I really don't like trying to evaluate values
> within a string.  I changed it to the following, which is more my style.
>  It's a bit more of a hassle, but it works all the time.

...

> '" . $connection->real_escape_string($postData['hName']) . "',
> '" . $connection->real_escape_string($postData['hName']) . "',
> '" . $connection->real_escape_string($postData['hName']) . "',

Yup, "build" the string instead of "interpret" the string. 
That's exactly how I rewrote it first, but I couldn't think of a good
reason to throw out what SHOULD work just because it ... didn't. So I
went looking for a difference that might make a difference to the
interpretor/parser that wouldn't make a difference to me, and that's
where I got to the "Wait, all of these objects have braces around the
whole thing. It didn't SAY it was needed, but the ostensibly Smart
People are doing it..."

-- 
63. Bulk trash will be disposed of in incinerators, not compactors. And
    they will be kept hot, with none of that nonsense about flames 
    going through accessible tunnels at predictable intervals.
	--Peter Anspach's list of things to do as an Evil Overlord

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